Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apiko-dev/meteor-multiple-insert
Adding an array object to the collection.
https://github.com/apiko-dev/meteor-multiple-insert
Last synced: about 2 months ago
JSON representation
Adding an array object to the collection.
- Host: GitHub
- URL: https://github.com/apiko-dev/meteor-multiple-insert
- Owner: apiko-dev
- License: mit
- Created: 2015-06-02T09:03:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-13T07:56:20.000Z (over 9 years ago)
- Last Synced: 2023-02-27T07:07:48.938Z (almost 2 years ago)
- Language: JavaScript
- Homepage: http://jssolutionsdev.com/
- Size: 160 KB
- Stars: 1
- Watchers: 14
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# meteor-multiple-insert
Adding an array object to the collection.
Made by [![Professional Meteor Development Studio](http://s30.postimg.org/jfno1g71p/jss_xs.png)](http://jssolutionsdev.com) - [Professional Meteor Development Company](http://jssolutionsdev.com)
# Usage
Add this package to your Meteor project: `meteor add jss:multiple-insert`.
After that you will be able to use `insertMultiple` function.
## collection.insertMultiple
`collection.insertMultiple(docs, [callback])` — Insert documents in the collection. Returns an array of their IDs. If you pass `Object` as the first argument, then `insertMultiple` will act in the same way as `collection.insert`.
Arguments:
- `docs`(`Array` or `Object`) — Documents or the single document to insert. May not yet have an `_id` attribute, in which case Meteor will generate for you.
- [`callback`(`Function`)] — Optional. If present, called with an error object as the first argument and, if no error, the `_id` as the second.# License
The `meteor-multiple-insert` project is under MIT license.