如何确保Gremlin顶点上的独特属性?

发布于 2025-02-13 20:46:33 字数 116 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事和酒 2025-02-20 20:46:33

这是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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文