summaryrefslogtreecommitdiff
path: root/jstests/or6.js
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-06-09 11:18:56 -0700
committerAaron <aaron@10gen.com>2010-06-09 11:18:56 -0700
commit828ca29ab4e58f3a6e0bc8702006474afda66ac9 (patch)
treeea0f80fbde30946c8e8b0cc44c5bce29d841e062 /jstests/or6.js
parent6837df161a4d6a14235683dccc03e6d9d498fbc4 (diff)
downloadmongo-828ca29ab4e58f3a6e0bc8702006474afda66ac9.tar.gz
SERVER-1206 $or hint
Diffstat (limited to 'jstests/or6.js')
-rw-r--r--jstests/or6.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/or6.js b/jstests/or6.js
index 00c94a71cd3..5408990c03d 100644
--- a/jstests/or6.js
+++ b/jstests/or6.js
@@ -13,4 +13,8 @@ assert.eq.automsg( "15", "t.find( {$or:[{a:{$gt:2,$lt:10}},{a:{$gt:0,$lt:15}}]}
// no separate clauses
assert.eq.automsg( "null", "t.find( {$or:[{a:{$gt:2,$lt:10}},{a:{$gt:3,$lt:5}}]} ).explain().clauses" );
-assert.eq.automsg( "20", "t.find( {$or:[{a:{$gt:2,$lt:10}},{a:{$gt:3,$lt:5}},{a:{$gt:20}}]} ).explain().clauses[ 1 ].indexBounds[ 0 ][ 0 ].a" ); \ No newline at end of file
+assert.eq.automsg( "20", "t.find( {$or:[{a:{$gt:2,$lt:10}},{a:{$gt:3,$lt:5}},{a:{$gt:20}}]} ).explain().clauses[ 1 ].indexBounds[ 0 ][ 0 ].a" );
+
+assert.eq.automsg( "null", "t.find( {$or:[{a:1},{b:2}]} ).hint( {a:1} ).explain().clauses" );
+assert.eq.automsg( "2", "t.find( {$or:[{a:1},{a:3}]} ).hint( {a:1} ).explain().clauses.length" );
+assert.eq.automsg( "'BasicCursor'", "t.find( {$or:[{a:1},{a:3}]} ).hint( {$natural:1} ).explain().cursor" ); \ No newline at end of file