mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
12 lines
280 B
JavaScript
12 lines
280 B
JavaScript
|
|
t = db.update8;
|
|
t.drop();
|
|
|
|
t.update( { _id : 1 , tags: {"$ne": "a"}}, {"$push": { tags : "a" } } , true )
|
|
assert.eq( { _id : 1 , tags : [ "a" ] } , t.findOne() , "A" );
|
|
|
|
t.drop()
|
|
//SERVER-390
|
|
//t.update( { "x.y" : 1 } , { $inc : { i : 1 } } , true );
|
|
//printjson( t.findOne() );
|