-
Connect to a mongodb of a Meteor app: run
meteor
at the project root. Start another shell, go to this folder, and runmeteor mongo
; -
List all available commands:
help
; -
List DB operation methods:
db.help()
; -
List all existing collection names:
show collections
; -
List all available commands of a collection:
db.<collection-name>.help()
; -
Show collection information:
db.<collection-name>.stats()
; -
Print all "name" field of collection "fairs":
db.fairs.find({}, {name_chn: 1})
; -
Print all fields except "name_chn" of collection "fairs":
db.fairs.find({}, {products: 0})
;