- 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.
推薦閱讀
- 繪制進程圖:可視化D++語言(第1冊)
- Mastering Elastic Stack
- 最簡數據挖掘
- Creo Parametric 1.0中文版從入門到精通
- 21天學通Visual C++
- 基于單片機的嵌入式工程開發詳解
- 悟透AutoCAD 2009案例自學手冊
- Hands-On Data Warehousing with Azure Data Factory
- Hands-On Dashboard Development with QlikView
- Building Google Cloud Platform Solutions
- Drupal高手建站技術手冊
- Visual Basic項目開發案例精粹
- RealFlow流體制作經典實例解析
- 智能小車機器人制作大全(第2版)
- 商業周刊/中文版·天地無人:無人技術專刊(商業周刊/中文版)