require("@arangodb/aql/functions").register(
"MYFUNCTIONS::VERTEX::INDEGREE",
function(vertex,edge, node) {
"use strict";
AQL_Query(
(return( "for t in Transaction collect vertex_count=t._from with into n return x"))
)
}
);
引发以下异常
JavaScript exception: SyntaxError: Unexpected token 'return'
!require("@arangodb/aql/functions").register("MYFUNCTIONS::VERTEX::INDEGREE", function(vertex,edge, node) {"use strict"; AQL_Query((return( "for t in Transaction collect vertex_count=t._from with into n return x")))});
! ^^^^^^
stacktrace: SyntaxError: Unexpected token 'return'
1条答案
按热度按时间wlzqhblo1#
使用
aql
模板字符串处理程序对查询进行assamble处理,类似于下面的内容应该可以帮助您开始: