简体   繁体   中英

Orientdb upsert using java

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

ODatabaseDocumentTx db = new ODatabaseDocumentTx(path);
db.open("root","root");
db.command(new OCommandSQL("update <document name > set a=30 where c=3")).execute();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM