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
Post a Comment