summaryrefslogtreecommitdiff
path: root/jstests/core/index_partial_read_ops.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:17:50 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:18:14 -0500
commit4ae691e8edc87d0e3cfb633bb91c328426be007b (patch)
tree52079a593f54382ca13a2e741633eab1b6271893 /jstests/core/index_partial_read_ops.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/index_partial_read_ops.js')
-rw-r--r--jstests/core/index_partial_read_ops.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/core/index_partial_read_ops.js b/jstests/core/index_partial_read_ops.js
index ef5c30d25a6..42f77486c17 100644
--- a/jstests/core/index_partial_read_ops.js
+++ b/jstests/core/index_partial_read_ops.js
@@ -10,8 +10,8 @@ load("jstests/libs/analyze_plan.js");
coll.drop();
assert.commandWorked(coll.ensureIndex({x: 1}, {partialFilterExpression: {a: {$lte: 1.5}}}));
- assert.writeOK(coll.insert({x: 5, a: 2})); // Not in index.
- assert.writeOK(coll.insert({x: 6, a: 1})); // In index.
+ assert.writeOK(coll.insert({x: 5, a: 2})); // Not in index.
+ assert.writeOK(coll.insert({x: 6, a: 1})); // In index.
//
// Verify basic functionality with find().
@@ -65,14 +65,14 @@ load("jstests/libs/analyze_plan.js");
//
// findAndModify operation that should use index.
- explain = coll.explain('executionStats').findAndModify({query: {x: {$gt: 1}, a: 1},
- update: {$inc: {x: 1}}});
+ explain = coll.explain('executionStats')
+ .findAndModify({query: {x: {$gt: 1}, a: 1}, update: {$inc: {x: 1}}});
assert.eq(1, explain.executionStats.nReturned);
assert(isIxscan(explain.queryPlanner.winningPlan));
// findAndModify operation that should not use index.
- explain = coll.explain('executionStats').findAndModify({query: {x: {$gt: 1}, a: 2},
- update: {$inc: {x: 1}}});
+ explain = coll.explain('executionStats')
+ .findAndModify({query: {x: {$gt: 1}, a: 2}, update: {$inc: {x: 1}}});
assert.eq(1, explain.executionStats.nReturned);
assert(isCollscan(explain.queryPlanner.winningPlan));
})();