克隆顶点及其子顶点

问题描述

我有以下图表:

Visual representation of graph

此处提供脚本以供参考: Page<T> find(Specification<T> specification,Pageable pageable) g.addV('Parent').property('active',true).as('parent') .addV('Child').property('name','child1').as('child1') .addE('HAS').from('parent') .addV('Child').property('name','child2').as('child2') .addE('HAS').from('parent') .addV('Child').property('name','child3').as('child3')

我想创建 Parent 及其所有子顶点的副本。换句话说,我想在 gremlin 中克隆父顶点和子顶点及其属性和边。

我的输入将是父顶点 ID。

我不想对查询中的子顶点数进行硬编码,因为每个父顶点的子顶点数都不同。

例如:父 1 可能有 2 个子顶点。父节点 2 可能有 10 个子节点。

我们如何在 gremlin 中使用父顶点 Id 克隆这个完整的集合?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...