我可以获得在 gremlin 中创建的边和顶点
的时间戳
a.addEdge("has",b)
a & b
是两个顶点。如何获取边缘创建时间?
最佳答案
边缘(或者更确切地说,一般的元素)没有任何元数据,如果这是您所要求的。创建边缘时,您必须将创建时间戳存储为属性。稍后您可以像查询其他属性一样查询时间戳。
// create the edge
a.addEdge("has", b, "created", System.currentTimeMillis())
// get the timestamp
g.V(a).outE("has").filter(inV().is(b)).values("created")
关于java - gremlin 中的边缘时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43230029/