-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Enhance detection for
CALL IN TRANSACTION
. (#1540)
Detects now also the `CONCURRENT` keyword. Fixes #1537, but I really think mixing up a script runner and its transactional flow with concurrent database managed transaction can be quite a source of confusion.
- Loading branch information
1 parent
fd16d3f
commit cd0f323
Showing
5 changed files
with
75 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
neo4j-migrations-core/src/test/resources/manual_resources/V000__Use_call_in_tx3.cypher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
MATCH (type:AssetType) MATCH (a:Asset)-[:ASSET_TYPE]->(type) | ||
CALL (a, type) { | ||
CALL apoc.create.setLabels(a, [ type.naam ] ) yield node | ||
} IN 2 CONCURRENT TRANSACTIONS OF 1000 ROWS; |
9 changes: 9 additions & 0 deletions
9
neo4j-migrations-core/src/test/resources/manual_resources/V000__Use_call_in_tx4.cypher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
LOAD CSV WITH HEADERS FROM 'https://data.neo4j.com/importing-cypher/movies.csv' AS row | ||
CALL (row) { | ||
MERGE (m:Movie {movieId: row.movieId}) | ||
MERGE (y:Year {year: row.year}) | ||
MERGE (m)-[r:RELEASED_IN]->(y) | ||
} IN 2 CONCURRENT TRANSACTIONS OF 10 ROWS ON ERROR CONTINUE REPORT STATUS as status | ||
WITH status | ||
WHERE status.errorMessage IS NOT NULL | ||
RETURN status.transactionId AS transaction, status.committed AS commitStatus, status.errorMessage AS errorMessage |