orientdb - 我们可以在 orientdb 中更新一条边吗?

标签 orientdb upsert orientdb-2.1

是否有可能得到一个例子来在 orientdb 中插入一条边。如果它不存在,有没有办法检查边是否存在,如果存在则只更新边,否则创建新边。我使用的是 Orientdb 2.1.13 版本。 谢谢

最佳答案

通过 SQL 你可以使用基本的 UPDATE 命令

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

关于orientdb - 我们可以在 orientdb 中更新一条边吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38060343/

相关文章:

c# - INSERT 或 UPDATE 以及在 SQL Server 上获取新创建的 id 的解决方案

sql - MS SQL 相当于 ON DUPLICATE KEY UPDATE/UPSERT

database - OrientDB 数据库导入失败

caching - OrientDB中的磁盘缓存如何按读缓存和写缓存分开(百分比)

mysql - Orientdb GC overhead limit exceeded/out of memory 错误和性能低下

orientdb - 使用 ArangoDb/OrientDb 进行分层数据模型和文档搜索 : is the right solution?

python - OrientDB:服务器和数据库之间时区不同的 python 中 SELECT 的日期时间转换问题

java - 如何在java代码中通过rexpro连接到rexster服务器?

database-design - 如何使用图数据库设计集合?

mongodb - 更新路径 'x' 会在 'x' 处产生冲突