【发布时间】:2022-01-06 11:15:11
【问题描述】:
我有一些 Gremlin.Net 代码将一个顶点复制到一个新顶点,将旧边标记为“结束”,链接新顶点(克隆)并更新其中的一些属性。忽略sn-p中我自己的DSL代码,我的问题是,我可以依赖这些SideEffects的顺序吗?我需要“更新”步骤才能最后运行
...AddV().Property("label", __.Select<Vertex>("existing").Label()).As("clone") // new vertex
.SideEffect(__
.Select<Vertex>("existing").Properties<VertexProperty>().As("p")
.Select<Vertex>("clone")
.Property(__.Select<VertexProperty>("p").Key(), __.Select<VertexProperty>("p").Value<object>()))
.SideEffect(__
.Select<Vertex>("existing").InE(DbLabels.ComponentEdge).As("ine")
.MarkToDate(operationTime)
.AddE(linkedEdgeLabel).From("parent").To("clone")
.MarkFromDate(operationTime))
.SideEffect(__
.Select<Vertex>("clone").UpdateVertexPropertiesUnchecked(propertyDict));
如果没有,有更好的方法吗?
【问题讨论】:
标签: gremlin gremlinnet