java - Running Mongodb javascript in Mongo 3.2 -


we upgrading mongodb 3.2. earlier running mongodb javascript used eval function : https://docs.mongodb.com/manual/reference/method/db.eval/

since method deprecated in java driver 3.0, not find similar option execute javascript. used below code earlier mongodb driver , looking similar this.

final dbobject command = new basicdbobject(); command.put("eval", <javascript_to_execute>); commandresult result = mongodb.command(command); 

thanks

amandeep

as mongo added depreciated warning - there no plan when switched off.

as have custom function there - legit check if implemented or implemented in future avoid clash..

see this


Comments

Popular posts from this blog

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -

testing - Detect whether test has failed within fixture -