0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00
mongodb/jstests/basic7.js

12 lines
195 B
JavaScript
Raw Normal View History

2009-01-27 05:28:26 +01:00
t = db.basic7;
t.drop();
t.save( { a : 1 } )
t.ensureIndex( { a : 1 } );
assert.eq( t.find().toArray()[0].a , 1 );
assert.eq( t.find().arrayAccess(0).a , 1 );
assert.eq( t.find()[0].a , 1 );