时间:2021-07-01 10:21:17 帮助过:23人阅读
To see the list of options and help for starting the mongo shell, use the --help option from the command line:
mongo --help
To see the list of help, in the mongo shell, type help:
help
In the mongo shell:
show dbs
New in version 2.4: show databases is now an alias for show dbs
db.help()
db.updateUser
In the mongo shell:
show collections
db.collection.help()
<collection> can be the name of a collection that exists, although you may specify a collection that doesn’t exist.
db.collection.save
When you perform read operations with the find() method in the mongo shell, you can use various cursor methods to modify the find() behavior and various JavaScript methods to handle the cursor returned from the find() method.
db.collection.find().help()
<collection> can be the name of a collection that exists, although you may specify a collection that doesn’t exist.
db.collection.find().toArray
Some useful methods for handling cursors are:
For examples on iterating a cursor and retrieving the documents from the cursor, see cursor handling. See also Cursor for all available cursor methods.
To get a list of the wrapper classes available in the mongo shell, such as BinData(), type help misc in the mongo shell:
help misc
MongoDB - The mongo Shell, Access the mongo Shell Help
标签:res when save bind osi info find inf tar