-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61d0902
commit 798524c
Showing
5 changed files
with
63 additions
and
54 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 was deleted.
Oops, something went wrong.
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,25 @@ | ||
MATCH (source:<<extracted_label>> {identifier: $identifier}) | ||
CALL { | ||
<% if ref_labels %> | ||
WITH source | ||
<% set union = joiner("UNION") %> | ||
<% for ref_label in ref_labels %> | ||
<% set index = loop.index0 %> | ||
<<union()>> | ||
MATCH (target_<<index>> {identifier: $ref_identifiers[<<index>>]}) | ||
MERGE (source)-[edge:<<ref_label>> {position: $ref_positions[<<index>>]}]->(target_<<index>>) | ||
RETURN edge | ||
<% endfor %> | ||
<% else %> | ||
RETURN null as edge | ||
<% endif %> | ||
} | ||
WITH source, collect(edge) as edges | ||
CALL { | ||
WITH source, edges | ||
MATCH (source)-[gc]->(:<<merged_labels|join("|")>>) | ||
WHERE NOT gc IN edges | ||
DELETE gc | ||
RETURN count(gc) as pruned | ||
} | ||
RETURN count(edges) as merged, pruned, edges |
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