ostrio:minimongo-extensions

v1.0.1Published 7 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Mini-mongo extensions

At this package we will publish mini-mongo functionality extensions

Install the driver

meteor add ostrio:minimongo-extensions

Extensions

Currently only one extension is available:

collection.insert(doc, [callback])

  • doc {Object|[Object]}
  • callback {Function}
    • error {Meteor.Error}
    • result {String|[String]} - New document ID or array of new documents IDs

After installing this package every collection.insert() will accept array of objects [Object], each object in array will be inserted separately by its own, in accordance to db.collection.insert MongoDB docs.

If doc is array of objects, second parameter of the callback is array of new documents IDs. For more see collection.insert(doc, [callback])