You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i have some data defined in mongoDB , i can get documents in shell through db.mycollection.find(), my question is can i write the same command db.mycollection.find() as a param through a function and then get the result , and do i have to use schema or model?
The text was updated successfully, but these errors were encountered:
Sorry, I'm a bit confused about what you're asking. I think you're asking can you pass in mongo shell parameters to mongoose queries. If so, the answer is yes. Here's an example:
@varunjayaraman I mean that i like mongojs's API that emulates the official mongodb API as much as possible , model and schema doesn't exit in official mongodb API , but i have to operate mongodb through model in mongoose, but i think i have a little understand about that way.
If i have some data defined in mongoDB , i can get documents in shell through
db.mycollection.find()
, my question is can i write the same commanddb.mycollection.find()
as a param through a function and then get the result , and do i have to use schema or model?The text was updated successfully, but these errors were encountered: