~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to jstests/recstore.js

  • Committer: Bazaar Package Importer
  • Author(s): Antonin Kral
  • Date: 2010-01-29 19:48:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100129194845-8wbmkf626fwcavc9
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// recstore.js
 
2
// this is a simple test for new recstores (see reci.h)
 
3
// it is probably redundant with other tests but is a convenient starting point
 
4
// for testing such things.
 
5
 
 
6
t = db.storetest;
 
7
 
 
8
t.drop();
 
9
 
 
10
t.save({z:3});
 
11
t.save({z:2});
 
12
 
 
13
t.ensureIndex({z:1});
 
14
t.ensureIndex({q:1});
 
15
assert( t.find().sort({z:1})[0].z == 2 );
 
16
 
 
17
t.dropIndexes();
 
18
 
 
19
assert( t.find().sort({z:1})[0].z == 2 );
 
20
 
 
21
t.ensureIndex({z:1});
 
22
t.ensureIndex({q:1});
 
23
 
 
24
db.getSisterDB('admin').$cmd.findOne({closeAllDatabases:1});