我正在尝试解析使用=~
正则表达式运算符的Cypher查询,但是在尝试使用libcypher-parser时出现错误。
我试图解析Neo4J文档中找到的查询:
WITH ['mouse', 'chair', 'door', 'house'] AS wordlist
UNWIND wordlist AS word
WITH word
WHERE word =~ '.*ous.*'
RETURN word
我尝试了以下命令:
echo "WITH ['mouse', 'chair', 'door', 'house'] AS wordlist UNWIND wordlist AS word WITH word WHERE word =~ '.*ous.*' RETURN word" | cypher-lint -a
我收到此错误:
<stdin>:1:100: Invalid input '~': expected NOT, '+', '-', TRUE, FALSE, NULL, "...string...", a float, an integer, '[', a parameter, '{', CASE, FILTER, EXTRACT, REDUCE, ALL, ANY, NONE, SINGLE, shortestPath, allShortestPaths, '(', a function name or an identifier
...ordlist UNWIND wordlist AS word WITH word WHERE word =~ '.*ous.*' RETURN word
^
真的不支持吗?我应该使用哪个版本的libcypher解析器来支持=~
运算符?
答案 0 :(得分:1)
这是0.6.0之前的libcypher-parser中的错误。应该在以后的版本中解决。