diff options
Diffstat (limited to 'jstests/find6.js')
-rw-r--r-- | jstests/find6.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/find6.js b/jstests/find6.js new file mode 100644 index 0000000..baa5969 --- /dev/null +++ b/jstests/find6.js @@ -0,0 +1,11 @@ + +t = db.find6; +t.drop(); + +t.save( { a : 1 } ) +t.save( { a : 1 , b : 1 } ) + +assert.eq( 2 , t.find().count() , "A" ); +assert.eq( 1 , t.find( { b : null } ).count() , "B" ); +assert.eq( 1 , t.find( "function() { return this.b == null; }" ).itcount() , "C" ); +assert.eq( 1 , t.find( "function() { return this.b == null; }" ).count() , "D" ); |