TuGraph cypher工具的使用

在shell下输入以下指令

locate lgraph_cypher.py

找到之后,cd 进入cypher工具所在的文件夹

成功运行lgraph_cypher.py 需要提前安装的Python包
在这里插入图片描述
添加国内源

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple prompt_toolkit

记得修改对应的ip以及端口号
127.0.0.1 就是localhost
在这里插入图片描述

工具包成功安装之后,调用如下命令可以直接进行cypher查询

./lgraph_cypher.py -u admin -P 73@TuGraph -s "MATCH (n) RETURN n"

-f 可以加cypher文件,而不只是单条查询语句

如果不输入-s -f 会进入交互模式

./lgraph_cypher.py -u admin -P 73@TuGraph

在这里插入图片描述
更换图

:use liveJournal

在这里插入图片描述
在这种模式下可以直接输入cypher语句进行查询,但要记得末尾的 ;

多行输入cypher语句
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43806430/article/details/128188873