Is there sth like `eval` in Neo4j?

爷,独闯天下 提交于 2020-01-16 09:05:33

问题


Can I evaluate cypher code from a string in Neo4j? I think about something like eval function in JavaScript.


回答1:


You will be helped by the apoc library with a rich set of tools to execute the cypher from the string:

call db.labels() yield label
call apoc.cypher.run("match (:`"+label+"`) return count(*) as count", null) yield value
return label, value.count as count


来源:https://stackoverflow.com/questions/55433173/is-there-sth-like-eval-in-neo4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!