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

25 lines
465 B
JavaScript
Raw Normal View History

2009-01-27 05:28:26 +01:00
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;
}
)
)