--Use of 'orderby' is not allowed for find command. --Passing a negative value for .batchSize() is no longer legal. --Find command accepts 64-bit skip and limit values. --Slow log line format has changed for find command.
12 lines
358 B
JavaScript
12 lines
358 B
JavaScript
t = db.sort3;
|
|
t.drop();
|
|
|
|
t.save( { a : 1 } );
|
|
t.save( { a : 5 } );
|
|
t.save( { a : 3 } );
|
|
|
|
assert.eq( "1,5,3" , t.find().toArray().map( function(z){ return z.a; } ) );
|
|
|
|
assert.eq( "1,3,5" , t.find().sort( { a : 1 } ).toArray().map( function(z){ return z.a; } ) );
|
|
assert.eq( "5,3,1" , t.find().sort( { a : -1 } ).toArray().map( function(z){ return z.a; } ) );
|