如何在文件中执行Cypher? [英] How to execute Cypher in a file?

查看:119
本文介绍了如何在文件中执行Cypher?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows上工作.我已经使用记事本创建了Cypher查询的文本文件.如何使用Neo4jShell或Neo4j Web界面控制台在文件中运行查询.

I am working on windows. I have created a text file of Cypher query using notepad. How can I run the query in the file using Neo4jShell or Neo4j web interface console.

推荐答案

在启动控制台时只需添加-file作为参数.

Just add -file as a parameter when starting the console.

在Windows上,它看起来像这样:

On windows, it would look like this :

Neo4jShell.bat -file path/to/cql/file 

或者您也可以将结果打印到新文件中

Or you could also print the result into a new file

Neo4jShell.bat -file path/to/cql/file > path/to/output/file

我也确信,有一种方法可以从外壳内部完成,而不是在启动时进行,正如Stefan Armbruster曾经向我演示的那样,但是出于对上帝的爱,我不记得他是怎么做到的.但是这种方法也行得通.

I'm also sure there is a way to do it from within the shell and not at startup, as it was once demonstrated to me by Stefan Armbruster but for the love of god, I can't remember how he did it. But this approach works as well.

这篇关于如何在文件中执行Cypher?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆