summaryrefslogtreecommitdiff
path: root/jstests/where3.js
blob: c062ed1151378017ac07f6e6f7fa17bb03e5d25b (plain)
1
2
3
4
5
6
7
8
9
10

t = db.where3;
t.drop()

t.save( { returned_date : 5 } );
t.save( { returned_date : 6 } );

assert.eq( 1 , t.find( function(){ return this.returned_date == 5; } ).count() , "A" );
assert.eq( 1 , t.find( { $where : "return this.returned_date == 5;" } ).count() , "B" );
assert.eq( 1 , t.find( { $where : "this.returned_date == 5;" } ).count() , "C" );