Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/asciidoc/reference/sql/sql-create-edge.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CREATE EDGE <type> [BUCKET <bucket>] FROM <rid>|[<rid>[,]*]|(<query>) TO <rid>|[
* *`&lt;type&gt;`* defines the type name for the edge.
* *`&lt;bucket&gt;`* defines the bucket in which you want to store the edge.
* *`UNIDIRECTIONAL`* creates a unidirectional edge; by default edges are bidirectional.
* *`IF NOT EXISTS`* skips the creation of the edge if another edge already exists with the same direction (same from/to) and same edge type. _(Since v26.12.1)_ The check holds under concurrent writers too: of two transactions creating the same edge at the same time, the second to commit is refused with a retryable `ConcurrentModificationException`, and its retry finds the edge the first one created (see <<cypher-merge-concurrency,concurrent `MERGE`>>). In v26.11.1 and earlier, concurrent writers could store the edge more than once.
* *`IF NOT EXISTS`* skips the creation of the edge if another edge already exists with the same direction (same from/to) and same edge type. _(Since v26.12.1)_ The check holds under concurrent writers too: of two transactions creating the same edge at the same time, the second to commit is refused with a retryable `ConcurrentModificationException`, and its retry finds the edge the first one created (see <<cypher-merge-concurrency,concurrent `MERGE`>>). In v26.11.1 and earlier, concurrent writers could store the edge more than once. _(Since v26.12.1)_ On a lightweight edge type the existing edge is returned as it is; a `SET` of the statement is not applied to an edge that already exists.
* *`JSON`* provides JSON content to set as the record. Use this instead of entering data field by field.
+
An `@in` / `@out` set through `SET` or `CONTENT` re-points the new edge, as <<sql-update,`UPDATE ... SET @in`>> does to an existing one: `CREATE EDGE F FROM #1:0 TO #1:1 SET @in = #1:2` creates an edge from `#1:0` to `#1:2`. A named record that does not exist, was deleted in the same transaction, or is not a vertex fails the statement, and no edge is stored. The same applies to an openCypher `CREATE` with an `@in` / `@out` property and to the Java `newEdge()`. _(Since v26.12.1: v26.11.1 stored an edge whose `@in` / `@out` disagreed with the vertex it was linked to, which `CHECK DATABASE FIX` then deleted, and v26.10.1 ignored the value.)_
Expand Down
Loading