summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2009-10-16 13:54:06 -0400
committerMathias Stearn <mathias@10gen.com>2009-10-16 13:57:03 -0400
commit448e629a814bb32be6a4a959f2df26be1a6b5c60 (patch)
treec4cb2160b9ab6a9c0dd73a2c92d5970e15bd7b30
parent74d68a42d42b95434570eebb81e4c1221deec8fa (diff)
downloadmongo-448e629a814bb32be6a4a959f2df26be1a6b5c60.tar.gz
sort lines in js help
-rw-r--r--shell/collection.js28
-rw-r--r--shell/db.js40
2 files changed, 34 insertions, 34 deletions
diff --git a/shell/collection.js b/shell/collection.js
index 8fa56f61065..74b457130b7 100644
--- a/shell/collection.js
+++ b/shell/collection.js
@@ -28,31 +28,31 @@ DBCollection.prototype.getName = function(){
DBCollection.prototype.help = function(){
print("DBCollection help");
- print("\tdb.foo.getDB() get DB object associated with collection");
- print("\tdb.foo.findOne([query])");
+ print("\tdb.foo.count()");
+ print("\tdb.foo.dataSize()");
+ print("\tdb.foo.drop() drop the collection");
+ print("\tdb.foo.dropIndex(name)");
+ print("\tdb.foo.dropIndexes()");
+ print("\tdb.foo.ensureIndex(keypattern,options) - options should be an object with these possible fields: name, unique, dropDups");
print("\tdb.foo.find( [query] , [fields]) - first parameter is an optional query filter. second parameter is optional set of fields to return.");
print("\t e.g. db.foo.find( { x : 77 } , { name : 1 , x : 1 } )");
- print("\tdb.foo.find(...).sort(...)");
+ print("\tdb.foo.find(...).count()");
print("\tdb.foo.find(...).limit(n)");
print("\tdb.foo.find(...).skip(n)");
- print("\tdb.foo.find(...).count()");
- print("\tdb.foo.count()");
+ print("\tdb.foo.find(...).sort(...)");
+ print("\tdb.foo.findOne([query])");
+ print("\tdb.foo.getDB() get DB object associated with collection");
+ print("\tdb.foo.getIndexes()");
print("\tdb.foo.group( { key : ..., initial: ..., reduce : ...[, cond: ...] } )");
- print("\tdb.foo.save(obj)");
- print("\tdb.foo.update(query, object[, upsert_bool])");
print("\tdb.foo.remove(query)" );
- print("\tdb.foo.ensureIndex(keypattern,options) - options should be an object with these possible fields: name, unique, dropDups");
- print("\tdb.foo.dropIndexes()");
- print("\tdb.foo.dropIndex(name)");
- print("\tdb.foo.getIndexes()");
- print("\tdb.foo.drop() drop the collection");
print("\tdb.foo.renameCollection( newName ) renames the collection");
- print("\tdb.foo.validate() - SLOW");
+ print("\tdb.foo.save(obj)");
print("\tdb.foo.stats()");
- print("\tdb.foo.dataSize()");
print("\tdb.foo.storageSize() - includes free space allocated to this collection");
print("\tdb.foo.totalIndexSize() - size in bytes of all the indexes");
print("\tdb.foo.totalSize() - storage allocated for all data and indexes");
+ print("\tdb.foo.update(query, object[, upsert_bool])");
+ print("\tdb.foo.validate() - SLOW");
}
DBCollection.prototype.getFullName = function(){
diff --git a/shell/db.js b/shell/db.js
index 4810e4dc250..e36e7afd963 100644
--- a/shell/db.js
+++ b/shell/db.js
@@ -237,36 +237,36 @@ DB.prototype.repairDatabase = function() {
DB.prototype.help = function() {
print("DB methods:");
- print("\tdb.auth(username, password)");
- print("\tdb.getMongo() get the server connection object");
- print("\tdb.getMongo().setSlaveOk() allow this connection to read from the nonmaster member of a replica pair");
- print("\tdb.getSisterDB(name) get the db at the same server as this onew");
- print("\tdb.getName()");
- print("\tdb.getCollection(cname) same as db['cname'] or db.cname");
- print("\tdb.runCommand(cmdObj) run a database command. if cmdObj is a string, turns it into { cmdObj : 1 }");
- print("\tdb.commandHelp(name) returns the help for the command");
print("\tdb.addUser(username, password)");
- print("\tdb.removeUser(username)");
- print("\tdb.createCollection(name, { size : ..., capped : ..., max : ... } )");
- print("\tdb.getReplicationInfo()");
- print("\tdb.printReplicationInfo()");
- print("\tdb.printSlaveReplicationInfo()");
- print("\tdb.getProfilingLevel()");
- print("\tdb.setProfilingLevel(level) 0=off 1=slow 2=all");
+ print("\tdb.auth(username, password)");
print("\tdb.cloneDatabase(fromhost)");
+ print("\tdb.commandHelp(name) returns the help for the command");
print("\tdb.copyDatabase(fromdb, todb, fromhost)");
- print("\tdb.shutdownServer()");
+ print("\tdb.createCollection(name, { size : ..., capped : ..., max : ... } )");
+ print("\tdb.currentOp() displays the current operation in the db" );
print("\tdb.dropDatabase()");
- print("\tdb.repairDatabase()");
print("\tdb.eval(func, args) run code server-side");
+ print("\tdb.getCollection(cname) same as db['cname'] or db.cname");
+ print("\tdb.getCollectionNames()");
print("\tdb.getLastError() - just returns the err msg string");
print("\tdb.getLastErrorObj() - return full status object");
+ print("\tdb.getMongo() get the server connection object");
+ print("\tdb.getMongo().setSlaveOk() allow this connection to read from the nonmaster member of a replica pair");
+ print("\tdb.getName()");
print("\tdb.getPrevError()");
- print("\tdb.resetError()");
- print("\tdb.getCollectionNames()");
- print("\tdb.currentOp() displays the current operation in the db" );
+ print("\tdb.getProfilingLevel()");
+ print("\tdb.getReplicationInfo()");
+ print("\tdb.getSisterDB(name) get the db at the same server as this onew");
print("\tdb.killOp() kills the current operation in the db" );
print("\tdb.printCollectionStats()" );
+ print("\tdb.printReplicationInfo()");
+ print("\tdb.printSlaveReplicationInfo()");
+ print("\tdb.removeUser(username)");
+ print("\tdb.repairDatabase()");
+ print("\tdb.resetError()");
+ print("\tdb.runCommand(cmdObj) run a database command. if cmdObj is a string, turns it into { cmdObj : 1 }");
+ print("\tdb.setProfilingLevel(level) 0=off 1=slow 2=all");
+ print("\tdb.shutdownServer()");
print("\tdb.version() current version of the server" );
}