0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/jni5.js
2009-06-01 17:28:13 -04:00

11 lines
268 B
JavaScript

t = db.jni5
t.drop();
t.save( { a : 1 } )
t.save( { a : 2 } )
assert.eq( 2 , t.find( { "$where" : "this.a" } ).count() , "A" );
assert.eq( 0 , t.find( { "$where" : "this.b" } ).count() , "B" );
assert.eq( 0 , t.find( { "$where" : "this.b > 45" } ).count() , "C" );