diff options
author | Aaron <aaron@10gen.com> | 2012-01-23 15:11:13 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2012-02-24 22:49:06 -0800 |
commit | eac5c56ed64fe98e4c77719a8f57d42cd5cb2632 (patch) | |
tree | b8a73c549f92370595c7bec648d57d3c6e8abdc5 /jstests/sortc.js | |
parent | cbc14d84aa92bf065f4998bb00af27c1dc946df8 (diff) | |
download | mongo-eac5c56ed64fe98e4c77719a8f57d42cd5cb2632.tar.gz |
SERVER-4150 checkpoint finish initial version of QueryResponseBuilder handling in order and scan and order plans
Diffstat (limited to 'jstests/sortc.js')
-rw-r--r-- | jstests/sortc.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/sortc.js b/jstests/sortc.js index ae0109f7a9d..f9aa202508b 100644 --- a/jstests/sortc.js +++ b/jstests/sortc.js @@ -6,17 +6,24 @@ t.drop(); t.save( {a:1} ); t.save( {a:2} ); -function checkA( a, sort, skip ) { - assert.eq( a, t.find().sort( sort ).skip( skip )[ 0 ].a ); +function checkA( a, sort, skip, query ) { + query = query || {}; + assert.eq( a, t.find( query ).sort( sort ).skip( skip )[ 0 ].a ); } function checkSortAndSkip() { checkA( 1, {a:1}, 0 ); checkA( 2, {a:1}, 1 ); + checkA( 1, {a:1}, 0, {a:{$gt:0},b:null} ); + checkA( 2, {a:1}, 1, {a:{$gt:0},b:null} ); + checkA( 2, {a:-1}, 0 ); checkA( 1, {a:-1}, 1 ); + checkA( 2, {a:-1}, 0, {a:{$gt:0},b:null} ); + checkA( 1, {a:-1}, 1, {a:{$gt:0},b:null} ); + checkA( 1, {$natural:1}, 0 ); checkA( 2, {$natural:1}, 1 ); |