0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/capped.js

11 lines
223 B
JavaScript
Raw Normal View History

2009-01-27 20:18:33 +01:00
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 );