mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
11 lines
223 B
JavaScript
11 lines
223 B
JavaScript
|
db.capped.drop();
|
||
|
db.createCollection("cptest", {capped:true, size:30000});
|
||
|
t = db.cptest;
|
||
|
|
||
|
t.save({x:1});
|
||
|
t.save({x:2});
|
||
|
|
||
|
assert( t.find().sort({$natural:1})[0].x == 1 );
|
||
|
assert( t.find().sort({$natural:-1})[0].x == 2 );
|
||
|
|