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

13 lines
290 B
JavaScript
Raw Normal View History

2009-01-27 05:28:26 +01:00
t = db.jni1;
t.remove( {} );
t.save( { z : 1 } );
t.save( { z : 2 } );
assert( 2 == t.find().length() );
assert( 2 == t.find( { $where : function(){ return 1; } } ).length() );
assert( 1 == t.find( { $where : function(){ return obj.z == 2; } } ).length() );
2009-01-31 23:22:22 +01:00
assert(t.validate().valid);