If the results are too long, they scroll away.If you are working on multiple sessions, you need multiple terminals.While some find it easy and quick, others might not find those characteristics appealing. The Mongo shell is strictly a console centric method of data manipulation.Being a shell inherently carries certain disadvantages. You will get the following output.Īlthough the Mongo shell is an excellent tool for learning and testing the MongoDB server, it is difficult to be used in a production environment. Press the tab key to get a full list of possible commands.Use up and down arrows to go back and forth in the commands history.There are two important keyboard shortcuts that you should know: For a full list of commands, check out the official Mongo shell page. We will discuss more data manipulation commands in coming tutorials. To get a full list of commands that you can execute on the current database, type db.help() Run the help command to get a list of help options available in the mongo shell. One important command will help you work with the Mongo shell easily: the help command. Use the show dbs command to Show all databases show dbs The forEach(printjson) method will print them with JSON formatting db.employee.find().forEach(printjson) ![]() ![]() Use the find method to fetch data in a collection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |