Skip to content

Instantly share code, notes, and snippets.

@freeeve
Created April 20, 2012 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freeeve/2431396 to your computer and use it in GitHub Desktop.
Save freeeve/2431396 to your computer and use it in GitHub Desktop.
example collection namespacing
> 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 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment