Thank you @MaBeuLux88_xxx
, Blogs are really helpful. In my Scenario complex part is I don’t know the collection name & what Operation(Find or Count) query intends to(and also I should not parse the string to get the collection name and operation).
ie.
db.getCollection(“user”).find( { “userName”: “xyz”} );
Second time, I may get the query string as
db.getCollection(“employee”).count( { “empId”: “123”} );
Is there any libraries that can help me to run shell queries from java/spring?