0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/ne1.js

12 lines
244 B
JavaScript
Raw Normal View History

2009-09-11 20:16:54 +02:00
t = db.ne1;
t.drop();
t.save( { x : 1 } );
t.save( { x : 2 } );
t.save( { x : 3 } );
assert.eq( 2 , t.find( { x : { $ne : 2 } } ).itcount() , "A" );
t.ensureIndex( { x : 1 } );
assert.eq( 2 , t.find( { x : { $ne : 2 } } ).itcount() , "B" );