官术网_书友最值得收藏!

Using Robomongo to query MongoDB

Robomongo allows you to run any query against a MongoDB that would use the MongoDB command-line utility. This is a great way to test the queries that you'll write and to view the results.

Getting ready

To use this recipe, you need to have a working installation of MongoDB and have Robomongo installed.

How to do it…

You can use Robomongo to run any query against MongoDB that you would run at the command line. Use the following command to retrieve a single record:

db.getCollection('accidents').findOne()

You can view the results in multiple formats:

  • Tree mode
  • Table mode
  • Text mode

By default, Robomongo will show you the results in tree mode as shown in the following screenshot:

主站蜘蛛池模板: 探索| 碌曲县| 徐汇区| 湘阴县| 新河县| 鄂尔多斯市| 西贡区| 曲水县| 定日县| 搜索| 平远县| 英德市| 随州市| 拉萨市| 施甸县| 仁化县| 太康县| 广西| 石狮市| 黑河市| 林州市| 沙湾县| 合阳县| 崇礼县| 蓬莱市| 郑州市| 梅河口市| 安远县| 黎平县| 深圳市| 光泽县| 长春市| 道孚县| 镇康县| 皮山县| 营山县| 阿瓦提县| 馆陶县| 图木舒克市| 石景山区| 邯郸市|