I have few stored Javascripts in mongodb. I am using spring springframework.data.mongodb to access mongodb. How can i execute stored JavaScripts/procedures from this ?
found the solution.
BasicDBObject obj = new BasicDBObject();
obj.append( "$eval" , "stored_javascript_name()" );
CommandResult t=mongoTemplate.executeCommand(obj);
Object obj1=t.get("retval");
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