- Mastering MongoDB 3.x
- Alex Giamas
- 136字
- 2021-08-20 10:10:54
Differences between scripting for the mongo shell and using it directly
When writing scripts for the mongo shell we cannot use the shell helpers. MongoDB's commands like use <database_name>, show collections, and other helpers are built into the shell and so are not available from the JavaScript context where our scripts will get executed. Fortunately, there are equivalents to them that are available from the JavaScript execution context, as shown in the following table:

In the previous table, it is the iteration cursor that the mongo shell returns when we query and get back too many results to show in one batch.
Using the mongo shell, we can script almost anything that we would from a client, meaning that we have a really powerful tool for prototyping and getting quick insights into our data.
推薦閱讀
- 中文版Photoshop CS5數(shù)碼照片處理完全自學一本通
- 手把手教你學AutoCAD 2010
- Hands-On Cloud Solutions with Azure
- 機艙監(jiān)測與主機遙控
- 自動化控制工程設計
- 21天學通C語言
- Excel 2007技巧大全
- Photoshop行業(yè)應用基礎
- 過程控制系統(tǒng)
- The DevOps 2.1 Toolkit:Docker Swarm
- 基于RPA技術(shù)財務機器人的應用與研究
- 青少年VEX IQ機器人實訓課程(初級)
- 智能制造系統(tǒng)及關(guān)鍵使能技術(shù)
- 手把手教你學Photoshop CS3
- Learn Microsoft Azure