我可以使用 orient-db 对 gremlin 查询服务器端进行排序和分页吗?
can i sort and page gremlin queries server side with orient-db?
到目前为止我的语法是这样的:
g.V().has('@class', 'Person').order{it.a.last_name <=> it.b.last_name}[0..9]
但提供给 order
的闭包似乎是 executed at the client,这意味着集合的整个范围需要移至客户端进行评估。
是这种情况吗?如果是这样,我使用 orient-db (2.2+
) 对服务器端进行排序和分页的选项是什么?
OrientDB数据库函数不能用纯GREMLIN语言执行,而是调用写1行JS或者SQL执行GREMLIN。语言为 SQL 的数据库函数示例:
select expand( gremlin( "g.V().has('@class', 'Person')
.order{it.a. last_name <=> it.b. last_name}[0..9]" ) )
注意:这仅适用于最新的 develop
版本 (2.2.1-SNAPSHOT)。
到目前为止我的语法是这样的:
g.V().has('@class', 'Person').order{it.a.last_name <=> it.b.last_name}[0..9]
但提供给 order
的闭包似乎是 executed at the client,这意味着集合的整个范围需要移至客户端进行评估。
是这种情况吗?如果是这样,我使用 orient-db (2.2+
) 对服务器端进行排序和分页的选项是什么?
OrientDB数据库函数不能用纯GREMLIN语言执行,而是调用写1行JS或者SQL执行GREMLIN。语言为 SQL 的数据库函数示例:
select expand( gremlin( "g.V().has('@class', 'Person')
.order{it.a. last_name <=> it.b. last_name}[0..9]" ) )
注意:这仅适用于最新的 develop
版本 (2.2.1-SNAPSHOT)。