如何使 Edge 在 Orientdb 中独一无二。
我想出的解决方案:
但这并不好。
Edge 没有任何属性。
Example:
create edge is_friend from #12:0 to #12:3
如果我再次调用它,应该会出现类似于创建唯一索引时的错误。
谢谢
对边缘出入字段创建约束。了解更多信息:
http://www.orientechnologies.com/docs/last/orientdb.wiki/Graph-Schema.html#constraints http://www.orientechnologies.com/docs/last/orientdb.wiki/Graph-Schema.html#constraints
在你的情况下试试这个:
CREATE INDEX UniqueEdges ON is_friend (out, in) unique
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)