summaryrefslogtreecommitdiff
path: root/jstests/jni9.js
blob: 940e36a28fc90f309997f3a02ea7b3d7083a7b46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
c = db.jni9;
c.drop();

c.save( { a : 1 } );
c.save( { a : 2 } );


assert.eq( 2 , c.find().length() );
assert.eq( 2 , c.find().count() );


assert.eq( 2 , 
           db.eval( 
               function(){
                   num = 0;
                   db.jni9.find().forEach(
                       function(z){
                           num++;
                       }
                   );
                   return num;
               }
           )
         )