如何确保Gremlin顶点上的独特属性?
Gremlin是否支持ID属性以外的独特属性?
试图弄清格里姆林是否有等效的定义Postgres中唯一的字段。
我总是可以查询图以查看该属性是否首先存在,我试图弄清楚是否有更有效的优雅方式。
Does Gremlin support unique properties other than ID property?
Trying to figure out if there's an equivalent in Gremlin to defining a field unique in Postgres for example.
I could always query the graph to see if the property exists first, I'm trying to figure out if there's a more efficient elegant way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是Apache TinkerPop将数据库实现器留下的东西,并且它确实因实现而有所不同。我看到您用
Amazon-Neptune
标记了问题。当前,Neptune仅对顶点和边缘执行唯一的ID约束。在以后的版本中,可能会添加其他模式约束功能,但是目前您必须在应用程序逻辑中监视/控制该功能。
This is something that Apache TinkerPop leaves up to the database implementor, and it does vary by implementation. I see you tagged the question with
amazon-neptune
. Currently Neptune only enforces the unique ID constraints for vertices and edges.It's possible in a future release that additional schema constraint capabilities will be added, but at the present time you would have to monitor/control that in your application logic.