Skip to content

Instantly share code, notes, and snippets.

@geoffeg
Created February 10, 2012 03:13
Show Gist options
  • Save geoffeg/1786043 to your computer and use it in GitHub Desktop.
Save geoffeg/1786043 to your computer and use it in GitHub Desktop.
Separate Mongodb fixed-size initial example.
db.searches.update(
{ _id : 1 },
{ $push : { "searches" : { "site" : "blekko.com", "q" : "mongodb" } } }
);
db.searches.update(
{ _id : 1 },
{ $pop : { "searches" : -1 } }
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment