summaryrefslogtreecommitdiff
path: root/jstests/core/stages_mergesort.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/stages_mergesort.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/stages_mergesort.js')
-rw-r--r--jstests/core/stages_mergesort.js38
1 files changed, 27 insertions, 11 deletions
diff --git a/jstests/core/stages_mergesort.js b/jstests/core/stages_mergesort.js
index 18c52bef40c..5156743078c 100644
--- a/jstests/core/stages_mergesort.js
+++ b/jstests/core/stages_mergesort.js
@@ -9,22 +9,38 @@ for (var i = 0; i < N; ++i) {
t.insert({baz: 1, bar: i});
}
-t.ensureIndex({foo: 1, bar:1});
-t.ensureIndex({baz: 1, bar:1});
+t.ensureIndex({foo: 1, bar: 1});
+t.ensureIndex({baz: 1, bar: 1});
// foo == 1
// We would (internally) use "": MinKey and "": MaxKey for the bar index bounds.
-ixscan1 = {ixscan: {args:{keyPattern:{foo: 1, bar:1},
- startKey: {foo: 1, bar: 0},
- endKey: {foo: 1, bar: 100000}, endKeyInclusive: true,
- direction: 1}}};
+ixscan1 = {
+ ixscan: {
+ args: {
+ keyPattern: {foo: 1, bar: 1},
+ startKey: {foo: 1, bar: 0},
+ endKey: {foo: 1, bar: 100000},
+ endKeyInclusive: true,
+ direction: 1
+ }
+ }
+};
// baz == 1
-ixscan2 = {ixscan: {args:{keyPattern:{baz: 1, bar:1},
- startKey: {baz: 1, bar: 0},
- endKey: {baz: 1, bar: 100000}, endKeyInclusive: true,
- direction: 1}}};
+ixscan2 = {
+ ixscan: {
+ args: {
+ keyPattern: {baz: 1, bar: 1},
+ startKey: {baz: 1, bar: 0},
+ endKey: {baz: 1, bar: 100000},
+ endKeyInclusive: true,
+ direction: 1
+ }
+ }
+};
-mergesort = {mergeSort: {args: {nodes: [ixscan1, ixscan2], pattern: {bar: 1}}}};
+mergesort = {
+ mergeSort: {args: {nodes: [ixscan1, ixscan2], pattern: {bar: 1}}}
+};
res = db.runCommand({stageDebug: {plan: mergesort, collection: collname}});
assert.eq(res.ok, 1);
assert.eq(res.results.length, 2 * N);