summaryrefslogtreecommitdiff
path: root/jstests/core/update8.js
blob: 596bc8695ddc7749ac4545fe009d5b48a40f2993 (plain)
1
2
3
4
5
6
7
8
9
10
11

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