Skip to content

Commit

Permalink
Replaced deprecated pattern (#780)
Browse files Browse the repository at this point in the history
Cross-references in CREATE statements are deprecated, as their semantics
are often unclear.
  • Loading branch information
arnefischereit authored and JPryce-Aklundh committed Nov 21, 2023
1 parent f8075be commit be228dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/ROOT/pages/styleguide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,27 @@ RETURN count(vehicle)
.Bad
[source, cypher, indent=0]
----
<<<<<<< HEAD
CREATE (a:End {prop: 42}),
(b:End {prop: 3}),
(c:Begin {prop: id(a)})
=======
MATCH (kate:Person {name: 'Kate'})-[r:LIKES]-(c:Car)
RETURN c.type
>>>>>>> e06eda8 ( Replaced deprecated pattern (#780))
----
+
.Good
[source, cypher, indent=0]
----
<<<<<<< HEAD
CREATE (a:End {prop: 42}),
(:End {prop: 3}),
(:Begin {prop: id(a)})
=======
MATCH (:Person {name: 'Kate'})-[:LIKES]-(c:Car)
RETURN c.type
>>>>>>> e06eda8 ( Replaced deprecated pattern (#780))
----

* Chain patterns together to avoid repeating variables.
Expand Down

0 comments on commit be228dd

Please sign in to comment.