summaryrefslogtreecommitdiff
path: root/jstests/jni1.js
blob: 9e33287a70960e5fc0d60bc53354e23c5a49069f (plain)
1
2
3
4
5
6
7
8
9
10
11
12


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() );

assert(t.validate().valid);