mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 09:06:21 +01:00
12 lines
195 B
JavaScript
12 lines
195 B
JavaScript
|
|
||
|
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 );
|
||
|
|