co-mongo
co-mongo copied to clipboard
need support for bulk
ok, this issue should be fixed easily and don't need to update "node-mongodb-native".
bulk is supported in api 1.4.x, but doesn't work with co-mongo.
we need support something like this:
var col = db.collection('my_collection'); var bulk = col.initializeUnorderedBulkOp();
//then, we can insert a lot of docs at once:
bulk.insert({_id:1, name: 1});
bulk.insert({_id:2, name: 2});
//....
yield bulk.execute();
many thanks
official api for 1.4.x: http://mongodb.github.io/node-mongodb-native/1.4/api-generated/collection.html?highlight=bulk#initializeUnorderedBulkOp