public
Created

example collection namespacing

  • Download Gist
mongotest.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11
> db.cars.current.insert({test:1});
> db.cars.backlog.insert({test:2});
> show collections;
cars.backlog
cars.current
system.indexes
> db.cars.find();
> db.cars.current.find();
{ "_id" : ObjectId("4f91bf18aa7c5687a0c686d2"), "test" : 1 }
> db.cars.backlog.find();
{ "_id" : ObjectId("4f91bf1eaa7c5687a0c686d3"), "test" : 2 }

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.