summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2015-10-23 11:06:55 -0400
committerDavid Storch <david.storch@10gen.com>2015-10-23 12:05:25 -0400
commitf3e6dadf23a81fa396a96e33b0fc6e5aedd3fe51 (patch)
treea52ded05298a2e779ef3d68eb479f6eaad1a86dc
parentf385e6ab5dc03d5a5b9ac31172e59077e7e100e3 (diff)
downloadmongo-f3e6dadf23a81fa396a96e33b0fc6e5aedd3fe51.tar.gz
SERVER-15176 clean up db.coll.find().help()
-rw-r--r--src/mongo/shell/query.js39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/mongo/shell/query.js b/src/mongo/shell/query.js
index 82ef143ab88..7b8190d526a 100644
--- a/src/mongo/shell/query.js
+++ b/src/mongo/shell/query.js
@@ -24,31 +24,32 @@ if ( typeof DBQuery == "undefined" ){
}
DBQuery.prototype.help = function () {
- print("find() modifiers")
- print("\t.sort( {...} )")
- print("\t.limit( n )")
- print("\t.skip( n )")
- print("\t.count(applySkipLimit) - total # of objects matching query. by default ignores skip,limit")
+ print("find(<predicate>, <projection>) modifiers")
+ print("\t.sort({...})")
+ print("\t.limit(<n>)")
+ print("\t.skip(<n>)")
+ print("\t.batchSize(<n>) - sets the number of docs to return per getMore")
+ print("\t.hint({...})")
+ print("\t.readPref(<mode>, <tagset>)")
+ print("\t.count(<applySkipLimit>) - total # of objects matching query. by default ignores skip,limit")
print("\t.size() - total # of objects cursor would return, honors skip,limit")
- print("\t.explain([verbose])")
- print("\t.hint(...)")
- print("\t.addOption(n) - adds op_query options -- see wire protocol")
- print("\t._addSpecial(name, value) - http://dochub.mongodb.org/core/advancedqueries#AdvancedQueries-Metaqueryoperators")
- print("\t.batchSize(n) - sets the number of docs to return per getMore")
- print("\t.showDiskLoc() - Deprecated. Use showRecordId().")
- print("\t.showRecordId() - adds a $recordId field to each returned object")
- print("\t.min(idxDoc)")
- print("\t.max(idxDoc)")
- print("\t.comment(comment)")
+ print("\t.explain(<verbosity>) - accepted verbosities are {'queryPlanner', 'executionStats', 'allPlansExecution'}")
+ print("\t.min({...})")
+ print("\t.max({...})")
+ print("\t.maxScan(<n>)")
+ print("\t.maxTimeMS(<n>)")
+ print("\t.comment(<comment>)")
print("\t.snapshot()")
+ print("\t.tailable(<isAwaitData>)")
+ print("\t.noCursorTimeout()")
+ print("\t.allowPartialResults()")
print("\t.returnKey()")
- print("\t.maxScan(n)")
- print("\t.readPref(mode, tagset)")
+ print("\t.showRecordId() - adds a $recordId field to each returned object")
print("\nCursor methods");
print("\t.toArray() - iterates through docs and returns an array of the results")
- print("\t.forEach( func )")
- print("\t.map( func )")
+ print("\t.forEach(<func>)")
+ print("\t.map(<func>)")
print("\t.hasNext()")
print("\t.next()")
print("\t.close()")