Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (18:27:30) Sebi: > db.user.save( {name: 'Sebi', pass: 'test', email: 'sebi@wtfstfu.org' } )
- > db.user.find()
- { "_id" : ObjectId("4d24a9f0fc29519697caf5c1"), "name" : "Sebi", "pass" : "test", "email" : "sebi@wtfstfu.org" }
- >
- mondodb in action ;D
- (18:28:30) Sebi: > db.user.save( {name: 'Sebi', pass: 'test', email: 'sebi@wtfstfu.org' } )
- > db.user.find()
- { "_id" : ObjectId("4d24a9f0fc29519697caf5c1"), "name" : "Sebi", "pass" : "test", "email" : "sebi@wtfstfu.org" }
- > db.user.save( {name: 'Andre', pass: 'test', email: 'mail@example.com', ist_doof: true } )
- > db.user.find()
- { "_id" : ObjectId("4d24a9f0fc29519697caf5c1"), "name" : "Sebi", "pass" : "test", "email" : "sebi@wtfstfu.org" }
- { "_id" : ObjectId("4d24aa27fc29519697caf5c2"), "name" : "Andre", "pass" : "test", "email" : "mail@example.com", "ist_doof" : true }
- >
- zweiter datensatz mit nem zusätzlichen attribut :D
- (18:33:59) Sebi: > db.user.update ( {name:"Andre"}, {$addToSet : {spielt: { $each : ['GN','STGC','WC3']}}} )
- > db.user.find()
- { "_id" : ObjectId("4d24a9f0fc29519697caf5c1"), "name" : "Sebi", "pass" : "test", "email" : "sebi@wtfstfu.org" }
- { "_id" : ObjectId("4d24aa27fc29519697caf5c2"), "email" : "mail@example.com", "ist_doof" : true, "name" : "Andre", "pass" : "test", "spielt" : [ "GN", "STGC", "WC3" ] }
- >
- keine schemas, die nerven! ;(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement