summaryrefslogtreecommitdiff
path: root/jstests/core/useindexonobjgtlt.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/useindexonobjgtlt.js')
-rw-r--r--[-rwxr-xr-x]jstests/core/useindexonobjgtlt.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/jstests/core/useindexonobjgtlt.js b/jstests/core/useindexonobjgtlt.js
index 026b1802843..c790019af9e 100755..100644
--- a/jstests/core/useindexonobjgtlt.js
+++ b/jstests/core/useindexonobjgtlt.js
@@ -1,14 +1,10 @@
t = db.factories;
t.drop();
-t.insert( { name: "xyz", metro: { city: "New York", state: "NY" } } );
-t.ensureIndex( { metro : 1 } );
+t.insert({name: "xyz", metro: {city: "New York", state: "NY"}});
+t.ensureIndex({metro: 1});
-assert( db.factories.find().count() );
+assert(db.factories.find().count());
-assert.eq( 1, db.factories.find( { metro: { city: "New York", state: "NY" } } )
- .hint({metro: 1})
- .count() );
+assert.eq(1, db.factories.find({metro: {city: "New York", state: "NY"}}).hint({metro: 1}).count());
-assert.eq( 1, db.factories.find( { metro: { $gte : { city: "New York" } } } )
- .hint({metro: 1})
- .count() );
+assert.eq(1, db.factories.find({metro: {$gte: {city: "New York"}}}).hint({metro: 1}).count());