mongodb - Is this a valid mongo command format? db.[database].[collection].find() -
i use mongohub of queries. noticed generates mongo command when fill out search criteria.
for example, generate this:
db.mydatabase.mycollection.find().sort({ "_id": 1}).skip(0).limit(30) when type db.mydatabase.mycollection.find() mongo shell command, nothing returned. (no error message generated either).
if instead type:
{ use mydatabase db.mycollection.find() } then results back.
anyone know how mongo interprets db.[???].[????].find()?
db.[???].[????].find() actually creates sub collection using notation, example:
> db.gt.gf.insert({g:1}) > show collections gt.gf system.indexes so though valid might not looking for.
Comments
Post a Comment