0
我正在尝试在mongoDB shell中返回一个收集数据。 这些都是我在MongoDB的壳输入的命令:无法在mongoDB shell中返回收集数据
> **show dbs**
local 0.000GB
messages 0.000GB
restapi 0.000GB
> **use restapi**
switched to db restapi
> **show collections**
messages
> **restapi.messages.find()**
错误:
2017-02-26T19:03:50.024+0200 E QUERY [thread1] ReferenceError: restapi is not defined :`
为了证明我有在信息收集的记录,我附上截图:
为什么我无法查看收藏内容?
尝试'db.messages.find()'是mongo shell语法,类似于您对于robomongo。更多https://docs.mongodb.com/manual/reference/method/db.collection.find/ – Veeram
谢谢!我虽然'数据库'意味着数据库名称! – osherdo