2017-04-05 174 views
-1

我能得到精怪创造的edge & vertex时间戳边缘时间戳

a.addEdge("has",b) 

a & b是两个顶点。我如何获得创建边缘的时间?

回答

2

边缘(或更确切地说元素)没有任何元数据,如果这就是你要求的。创建边时,必须将创建的时间戳存储为属性。稍后,您可以像查看其他任何属性一样查询时间戳。

// create the edge 
a.addEdge("has", b, "created", System.currentTimeMillis()) 

// get the timestamp 
g.V(a).outE("has").filter(inV().is(b)).values("created")