-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.js
More file actions
18 lines (18 loc) · 766 Bytes
/
examples.js
File metadata and controls
18 lines (18 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// the following are all the available methods: ---------------
// [C] Create ----
factory.createOne(Model, dataObj, options)
// [R] Read ----
factory.getMany(Model, (filterObj = {}), options)
factory.getOne(Model, filterObj, options)
factory.getOneById(Model, id, options)
// [U] Update ----
factory.updateOne(Model, filterObj, updateObj, options)
factory.updateOneById(Model, id, updateObj, options)
factory.updateOneWithSave(Model, filterObj, updateObj, options)
factory.updateOneWithSaveById(Model, id, updateObj, options)
// [D] Delete ----
factory.deleteOne(Model, filterObj, options)
factory.deleteOneById(Model, id, options)
// don't use these as they're not guarnteed
factory.archiveOne(Model, filterObj, options)
factory.archiveOneById(Model, id, options)