Neo4j shell脚本中出现提交错误

Neo4j shell脚本中出现提交错误,neo4j,Neo4j,我在Linux上用at Begin命令启动了一个Neo4J shell脚本,创建了3500个关系,并以COMMIT结束:COMMIT出错,并说这不是一个有效的命令,我假设是因为;而承诺的结束。。。如何知道事务是否回滚或如何回滚?不完全理解您的问题begin/commit/rollback不需要尾随分号,但neo4j shell中使用的cypher语句需要。请参见以下transscript: $ bin/neo4j-shell Welcome to the Neo4j Shell! Enter '

我在Linux上用at Begin命令启动了一个Neo4J shell脚本,创建了3500个关系,并以COMMIT结束:COMMIT出错,并说这不是一个有效的命令,我假设是因为;而承诺的结束。。。如何知道事务是否回滚或如何回滚?

不完全理解您的问题
begin
/
commit
/
rollback
不需要尾随分号,但neo4j shell中使用的cypher语句需要。请参见以下transscript:

$ bin/neo4j-shell
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337

neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1    
4 ms
neo4j-sh (0)$ rollback
Transaction rolled back
neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1
9 ms
neo4j-sh (0)$ commit
Transaction committed

rollback和commit提供非常清晰的消息,可以是“transactionrollback”或“transactioncommitted”。如果您离开一个shell会话,该会话包含一个
开始
,但没有使用
提交
回滚来结束,则事务将在shell终止时回滚。

不完全理解您的问题
begin
/
commit
/
rollback
不需要尾随分号,但neo4j shell中使用的cypher语句需要。请参见以下transscript:

$ bin/neo4j-shell
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337

neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1    
4 ms
neo4j-sh (0)$ rollback
Transaction rolled back
neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1
9 ms
neo4j-sh (0)$ commit
Transaction committed

rollback和commit提供非常清晰的消息,可以是“transactionrollback”或“transactioncommitted”。如果您离开一个shell会话,该会话包含一个
开始
,但没有使用
提交
回滚来结束,则事务将在shell终止时回滚。

不完全理解您的问题
begin
/
commit
/
rollback
不需要尾随分号,但neo4j shell中使用的cypher语句需要。请参见以下transscript:

$ bin/neo4j-shell
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337

neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1    
4 ms
neo4j-sh (0)$ rollback
Transaction rolled back
neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1
9 ms
neo4j-sh (0)$ commit
Transaction committed

rollback和commit提供非常清晰的消息,可以是“transactionrollback”或“transactioncommitted”。如果您离开一个shell会话,该会话包含一个
开始
,但没有使用
提交
回滚来结束,则事务将在shell终止时回滚。

不完全理解您的问题
begin
/
commit
/
rollback
不需要尾随分号,但neo4j shell中使用的cypher语句需要。请参见以下transscript:

$ bin/neo4j-shell
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337

neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1    
4 ms
neo4j-sh (0)$ rollback
Transaction rolled back
neo4j-sh (0)$ begin
Transaction started
neo4j-sh (0)$ create (:Person {name:'John'});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 1
Properties set: 1
Labels added: 1
9 ms
neo4j-sh (0)$ commit
Transaction committed
rollback和commit提供非常清晰的消息,可以是“transactionrollback”或“transactioncommitted”。如果您离开一个shell会话,该会话包含一个
开始
,但没有使用
提交
回滚完成,则在shell终止时回滚事务