June 2014
Intermediate to advanced
696 pages
38h 52m
English
You have already seen the process of creating a collection. You simply use the createCollection() method on the Db object. For example:
var newDB = db.db("newDB");newDB.createCollection("newCollection", function(err, collection){ }
The value of the collection parameter of the callback is a Collection object. You can use this object to manipulate the collection, add documents, etc.
Read now
Unlock full access