0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/update8.js
Eliot Horowitz 63c52d08da cleaning
2009-12-16 23:34:43 -05:00

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() );