尝试使用Neo4j 2.1.7 / 2.2.0版 CQL包含=> FOREACH(姓名在[" Hindu","穆斯林"," Christian"," Jain"] | CREATE(:Religion {title:name }));
我无法使用neo4j shell导入它。错误抛出:未知命令' foreach'。
我通过PHP生成CQL文件。
答案 0 :(得分:2)
似乎neo4j-shell
并不知道有效的cypher语句可以以FOREACH
开头。一个简单的解决方法是从WITH
开始:
with ["Hindu","Muslim","Christian","Jain"] as r
foreach (name in r|create (:Religion{title:name}));