【发布时间】:2023-10-09 05:26:01
【问题描述】:
我的用户顶点具有传入通知边缘,如下所示:
用于获取通知的代码
g.v(17929472).outE('Notification')
我得到的回应:
{
"success": true,
"results": [
{
"Type": "UserReaction",
"PostedDate": "2016-04-15T09:03:42.8391677Z",
"NotificationInitiatedByVertexId": "2304",
"_id": "c7bb4-aoagw-sgl-aoao0",
"_type": "edge",
"_outV": 17929472,
"_inV": 17929728,
"_label": "Notification"
}
],
"version": "2.5.0",
"queryTime": 15.310751
}
每当用户查看通知时,我都会保存上次查看的日期并希望使用该日期来获取该日期之后出现的所有通知。
我试过了:
g.v((5124096).outE).outE.has('PostedDate',T.gte, 2016-04-15T07:52:31.6979843Z).inV
但它给出了错误。
【问题讨论】:
-
您的代码表明您使用的是 TinkerPop 2.x。我强烈建议改用 TinkerPop 3+,它完全重写了一个更强大的 API。
标签: graph gremlin titan rexster