Orientdb upsert using java

别等时光非礼了梦想. 提交于 2019-12-13 08:09:19

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!