I executed a command in mongo.exe. Let's try with the most basic command.
> db.tablebusiness.find({"_id": "the-simmons-paradise__41.85_-87.88"});
I got results:
Now I try similar command in rockmongo. If I execute
db.tablebusiness.find(
{"_id": "the-simmons-paradise__41.85_-87.88"}
);
Result:
{
"retval": null,
"ok": 1
}
Basically it seems to tell me that the result is ok or something like that? I am not sure.
If I elaborate:
var cur = db.tablebusiness.find(
{"_id": "the-simmons-paradise__41.85_-87.88"}
);
cur.forEach(function(x){print(tojson(x))});
Result:
{
"retval": null,
"ok": 1
}
Same problem.
If I do:
function () {
return db.tablebusiness.find({"_id": "the-simmons-paradise__41.85_-87.88"});
}
I got:
{
"retval": {
"value": "DBQuery: hello.tablebusiness -> undefined"
},
"ok": 1
}
What does it mean by hello.tablebusiness -> undefined is beyond me. As you see from above, I successfully execute the query just fine in mongo.exe
Looks like rockmongo has very limited feature. I wonder how to actually see result. How to execute random mongodb command in rockmongo and observe the result.
First of all I agree with you: rockmongo has very limited feature at the moment. I use it for simple queries because allows me access to my remote server from any browsing enabled device.
The "execute" area in rockmongo run with "Javascript API" and not behave like the mongo shell.
Try this:
function () {
var cur = db.tablebusiness.find(
{"_id": "the-simmons-paradise__41.85_-87.88"}
);
var out = [];
cur.forEach(function(x){out.push(x);});
return(out);
}
You can run simple queries clicking on the collection name, typing your query condition in the upper area...
{"_id": "the-simmons-paradise__41.85_-87.88"}
...and then "submit query"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With