Created
April 9, 2011 22:14
-
-
Save xjamundx/911831 to your computer and use it in GitHub Desktop.
simple mongo collection with mongohq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ mongo -u USERNAME -p PASSWORD Flame.mongohq.com:27094/wereviewutah | |
MongoDB shell version: 1.6.5 | |
connecting to: Flame.mongohq.com:27094/wereviewutah | |
> db.logs.find() | |
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 1 } | |
> db.logs.findOne() | |
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 1 } | |
> db.logs.update({}, {$inc:{count:1}}) | |
> db.logs.findOne() | |
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 2 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you