问题
i have a document in orient db like
{"a":"1","b":"2","c":"3"}
how can i update the value of b if c is 3 using java
i need to execute the below query using java
UPDATE <document name >Merge {"a":25"} where c=3
please help me
回答1:
ODatabaseDocumentTx db = new ODatabaseDocumentTx(path);
db.open("root","root");
db.command(new OCommandSQL("update <document name > set a=30 where c=3")).execute();
来源:https://stackoverflow.com/questions/33328695/orientdb-upsert-using-java