Created
October 5, 2011 09:59
-
-
Save zolzaya/1264070 to your computer and use it in GitHub Desktop.
MongoDB - Basic
This file contains hidden or 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
> use store | |
switched to db store | |
> zoloo = {username: 'Zoloo', created_at: new Date('10/05/2011'), password: 'secret', last_visited_at: new Date('10/05/2011')} | |
{ | |
"username" : "Zoloo", | |
"created_at" : ISODate("2011-10-04T16:00:00Z"), | |
"password" : "secret", | |
"last_visited_at" : ISODate("2011-10-04T16:00:00Z") | |
} | |
> db.users.insert(zoloo) | |
> db.users.findOne() | |
{ | |
"_id" : ObjectId("4e8c2a00de570598c220878b"), | |
"username" : "Zoloo", | |
"created_at" : ISODate("2011-10-04T16:00:00Z"), | |
"password" : "secret", | |
"last_visited_at" : ISODate("2011-10-04T16:00:00Z") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment