0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/multi.js
2009-04-07 10:33:11 -04:00

7 lines
201 B
JavaScript

t = db.jstests_multi;
t.drop();
t.ensureIndex( { a: 1 } );
t.save( { a: [ 1, 2 ] } );
assert.eq( 1, t.find( { a: { $gt: 0 } } ).count() );
assert.eq( 1, t.find( { a: { $gt: 0 } } ).toArray().length );