首页 > 解决方案 > 在 Azure Cosmos DB Graph 查询中定义变量

问题描述

我正在努力使用 Gremlin.NET 在 Azure Cosmos DB Graph 上运行分页脚本:

t = g.V().hasLabel('person');[]
t.next(2)
t.next(2)

它来自Tinkerpop 页面,其中描述了如何重用遍历实例以避免加载整个图。

不幸的是,在 Gremlin .NET 中,我得到:

ExceptionType : GraphSyntaxException
ExceptionMessage :
  Gremlin query syntax error: Unsupported groovy expression kind: t=g.V().hasLabel('person') @ line 1, column 1.

Azure Cosmos DB Graph 可能不支持这种结构,但我找不到任何可以证明这一点的材料。

标签: azure-cosmosdbtinkerpopazure-cosmosdb-gremlinapi

解决方案


推荐阅读