THE MONGO SHELL
Introduction to basic shell commands
INTRODUCTION
Copyright By PowCoder代写 加微信 powcoder
MongoDB comes with a Javascript shell that allows interaction with a MongoDB instance from the command line.
INTRODUCTION
Mongo has to be started before using it.
$sheehan:> mongod
RUNNING THE SHELL
To start the shell, run the ¡®mongo¡¯ executable.
The shell is a full-featured JavaScript interpreter, capable of running arbitrary Javascript expressions.
SHELL COMMAND: ¡®DB¡¯
What database are you using
SHELL COMMAND: ¡®USE¡¯
Which database do you want?
SHELL: INSERT()
Insert a Document to your Collection
SHELL: FIND()
Displays all the documents.
SHELL: FINDONE()
Finds just one Document.
SHELL: PRETTY()
Nicely formats your query data.
SHELL: UPDATE()
Updates a Document.
SHELL: DELETE()
Deletes a Document.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com