Collection
Object representing a mongo collection. Create it using manager.get
.
A Collection instance has the following methods:
- aggregate
- bulkWrite
- count
- distinct
- drop
- dropIndex
- dropIndexes
- ensureIndex
- find
- findOne
- findOneAndDelete
- findOneAndUpdate
- geoHaystackSearch
- geoNear
- group
- indexes
- insert
- mapReduce
- remove
- stats
- update
Example
const users = db.get('users', options)
Options
You can set options to pass to every queries of the collection.
users.options = {
castIds: true
}