Inserts a single document or a an array of documents into MongoDB.
-
docs
(Object|Array) -
[
options
] (Object)
Use castIds: false
to disable autocasting of '_id' properties to ObjectIds objects.
- [
callback
] (function)
A promise.
users.insert({ woot: 'foo' })
users.insert([{ woot: 'bar' }, { woot: 'baz' }])