Neo4j Cypher 中的多个不相关查询? [英] Multiple unrelated queries in Neo4j Cypher?

查看:25
本文介绍了Neo4j Cypher 中的多个不相关查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://localhost:7474/browser/ 是否不支持多个 无关 查询?

Does http://localhost:7474/browser/ not support multiple unrelated queries?

此代码:

MATCH (a {cond:'1'}), (b {cond:'x'}) CREATE a-[:rel]->b
MATCH (a {cond:'2'}), (b {cond:'y'}) CREATE a-[:rel]->b
MATCH (a {cond:'3'}), (b {cond:'z'}) CREATE a-[:rel]->b

导致错误:

在 CREATE 和 MATCH 之间需要 WITH

WITH is required between CREATE and MATCH

但由于我的查询不相关,我认为我不需要 WITH.

But since my queries aren't related, I don't think I shall need a WITH.

如何在无需一次输入一行的情况下执行上述操作?

How do I do the above without having to enter it one-line-at-a-time?

推荐答案

在最近的版本中,开发人员在 Neo4j 浏览器中添加了一个选项来执行多个查询.

In recent releases developers added an option in Neo4j Browser to execute multiple queries.

打开浏览器设置,然后点击启用多语句查询编辑器.

然后在每个查询的末尾加上分号,然后将它们全部扔到浏览器控制台中.

Then just put semicolon on the end of each query and throw them all in browser console.

这是它的样子

这篇关于Neo4j Cypher 中的多个不相关查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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