我正在运行一个查询,以遍历特定标签后面的所有"In"边,稍后我将对"Out"边执行类似的查询.我希望以树的形式获得它,因为可能有一个具有多条边的顶点要遍历,并且需要在我的客户端中反映这一点,所以我不能在这里只使用ToList()
.
我目前正在使用Gremlin-Go SDK,但当调用Tree()
步骤时,我得到一个反序列化错误.以下是我的客户机代码的一段代码:
res, err := g.V(id).
Emit().
Repeat(__.In(label)).
Tree().
Next() // Other terminal steps produce same issue
这会对数据类型0x2b
产生反序列化错误,该数据类型为GraphBinary core data type "Tree"
2023/02/28 12:23:05 Error occurred during operation gremlinServerWSProtocol.readLoop(): 'E0408: unknown data type to deserialize 0x2b'
2023/02/28 12:23:05 Read loop error 'E0408: unknown data type to deserialize 0x2b', closing read loop.
2023/02/28 12:23:05 Connection error callback invoked, closing protocol.
Gremlin-Go参考文档似乎没有提到任何关于特定序列化支持的内容.根据gremlin-go
README的说法,它支持所有核心GraphBinary数据类型.我在Gremlin控制台中测试了我的查询,以验证查询和服务器:
g.V(<ID>).emit().repeat(__.in(<LABEL>)).tree().next()
.
对于一些额外的背景,我在本地针对gremlin-server:3.5.3
进行了开发,以试验最终确定支持AWS海王星的查询的意图.我知道这些不能完全互换,将遵循Neptune-Gremlin reference.最新版本的海王星指定Gremlin的最新受支持版本为3.5.3.