Can we UPSERT an EDGE in orientdb?

烈酒焚心 提交于 2019-12-01 07:06:24

问题


Is it possible to get an example to upsert an edge in orientdb. IF it does not exist is there a way to check if the edge exist, if it does then just update the edge else create a new edge. I am using Orientdb 2.1.13 version. Thank you


回答1:


via SQL you can use the basic UPDATE command

update written_by SET out = #9:2, in = #16:43, prop="gianni" UPSERT WHERE out = #9:2 and in = #16:43

http://orientdb.com/docs/last/SQL-Update.html



来源:https://stackoverflow.com/questions/38060343/can-we-upsert-an-edge-in-orientdb

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