Mongo shell like query in Java

55 views
Skip to first unread message

Meirkhan Rakhmetzhanov

unread,
Jul 2, 2019, 4:57:25 PM7/2/19
to mongodb-user
Hello,

I need function which would take mongo shell like query as input parameter and execute it.

- db.eval() is deprecated
- in Jongo you have to know beforehand whether it is "find", "aggregate" or other query.

So, which analog for db.eval() we have? If there is no such, what is your suggestion on my issue?

Thank you

Wan Bachtiar

unread,
Jul 4, 2019, 3:44:23 AM7/4/19
to mongodb-user

I need function which would take mongo shell like query as input parameter and execute it.

Hi Meirkhan,

Could you elaborate your use case and goal with examples please ?

If you’re referring to db.eval method, it takes a JavaScript function not a shell like query input.

Regards,
Wan.

Reply all
Reply to author
Forward
0 new messages