blob: d344d773dca74186df30b728359cb0d4807090a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
t = db.find_and_modify_server7660;
t.drop();
a = t.findAndModify(
{query: {foo: 'bar'}, update: {$set: {bob: 'john'}}, sort: {foo: 1}, upsert: true, new: true});
b = t.findOne();
assert.eq(a, b);
assert.eq("bar", a.foo);
assert.eq("john", a.bob);
|