Kayıtlar

Aralık 16, 2015 tarihine ait yayınlar gösteriliyor
tüm dökümanları güncellemek için db.getCollection('FileContext').update({},                                        { "$set" : {"OrderId": 1 }},                                        {multi:true}) ilgili collectionda sorgula db.getCollection('FileContext').find({},{OrderId: 1, Status:1}).sort({OrderId:1}) ilgili collectionda çoklu güncelle db.FileContext.update({},{'$set':{"Status": true}} , { multi:true}) ilgili collectionda sorgulayarak doğrula db.FileContext.find({},{OrderId: 1, Status:1}).sort({OrderId:1}) ilgili collectionda sorgula db.getCollection('FileContext').find({},{OrderId: 1}).sort({OrderId:1})

Mongo Db Sorgular

//db.getCollection('FileContext2').find({}) /* eklemek için db.FileContext2.update({},                           {$set : {"OrderId2":2}},                           {upsert:false,                           multi:true}) */ /* ilgili field collectiondan çıkarmak için db.FileContext2.update({},{$unset: {OrderId2:1}},false,true) */     /* //önce değişmemiş haline bak db.FileContext2.find({"_id" : ObjectId("566e1749a630f21d1cfadc19")}) //sonra güncelle db.FileContext2.update({"_id" : ObjectId("566e1749a630f21d1cfadc19")},{ $set : { "OrderId": 23}}) //sonra güncellenen sorguya bak db.FileContext2.find({"_id" : ObjectId("566e1749a630f21d1cfadc19")}) */