neo4j-contrib / neo4j-apoc-procedures

Awesome Procedures On Cypher for Neo4j - codenamed "apoc"                     If you like it, please ★ above ⇧            

Home Page:https://neo4j.com/labs/apoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apoc.cypher.runFile() - Unexpected behaviour with commented ";"

bastienhubert opened this issue · comments

Expected Behavior (Mandatory)

In a cypher file, when I comment a line containing ";", apoc.cypher.runFile() should execute all the other statements contained in the file.

Actual Behavior (Mandatory)

When I comment a line containing a ";", the statements below this line are not executed by the procedure.

How to Reproduce the Problem

Steps (Mandatory)

  1. Take a simple cypher file:
 RETURN "Step 1";
 RETURN "Step 2";
 RETURN "Step 3";
  1. Comment a statement in the file:
 RETURN "Step 1";
 // RETURN "Step 2";
 RETURN "Step 3";
  1. Run this file using apoc.cypher.runFile() => the "step 3" statement is not executed anymore

  2. Remove the semicolon of the commented line:

 RETURN "Step 1";
 // RETURN "Step 2"
 RETURN "Step 3";
  1. Run this file using apoc.cypher.runFile() => the "step 3" statement is now executed

Specifications (Mandatory)

Currently used versions

Versions

  • OS: MacOs Sonoma 14.0
  • Neo4j: 5.12
  • Neo4j-Apoc-Extended: 5.12.0

(This issue also occurs in Neo4j 4.4.4 with APOC 4.4.4)