![](/img/trans.png)
[英]Meteor - How can I find/get an object in a MongoDB collection and push it into another collection with a method?
[英]How can I find a meteor mongodb collection from the shell?
當我進入“流星mongo”或“ mongo localhost:3001”時,將打開一個外殼。 如果我“顯示數據庫”,它將顯示:
customers 0.000GB
local 0.008GB
meteor 0.002GB
我在修補殼的過程中從外殼內部創建了一個集合,該集合當前可見。 但是,看不見的是我的應用程序中存在的幾個集合! 例如,在流星應用程序中,從本地主機,當我鍵入“ Jobs.find()。fetch()”和“ Tasks.find()。fetch()”時,會得到文檔的返回。 如果我更新這些文檔,則在重新啟動應用程序后,該文檔仍然存在。
這些集合確實存在,但是我不知道如何通過外殼訪問它們。
您可以這樣訪問您的收藏集:
> use meteor;
> db.myCollection.find();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.