blob: 8bc91c86788ac85e8e86b3fc3952eaead9135d86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
db=connect("test");
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 );
|