Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
boggle committed Apr 10, 2018
1 parent 4d2135e commit cbb52a8
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions cip/1.accepted/CIP2017-06-18-multiple-graphs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ If one of the bound variables in a pattern is an entity that is not contained in

An error is raised, if a statement attempts to update an entity that is not contained in the working graph.

==== Copy patterns
=== Copy patterns

A new type of pattern that is called a *copy pattern* may be used to copy all labels and properties of a node or the relationship type and all properties of a relationship.
The syntax of clone patterns is:
Expand All @@ -305,20 +305,6 @@ Copying relationships ignores the start and the end node of the relationship.

Copy patterns may be used in updating statements.

==== Clone patterns

A new type of pattern that is called a *clone pattern* may be used find the clone (if present) for a source entity as determined by provenance tracking.

[source, cypher]
----
MATCH (a)-[r]->(b)
FROM another_graph
MATCH (x CLONE OF b)-[CLONE OF r]->()
...
----

Clone patterns should not be used in updating statements.


=== Returning a graph result

Expand Down Expand Up @@ -381,6 +367,7 @@ A single statement may end in a `<graph-construction>`.

// TODO: FORK nodes
// TODO: REMOVE n.prop on clokes
// TODO: Define lineage tree
In order to reconstruct subgraph structures from other graphs in the new graph, `CONSTRUCT` supports the addition of *cloned entities* in the new graph.

_Definition_: *Cloning* ensures that exactly one new entity (called a *clone*) is created in the new graph for a given cloned entity (called its *source*) from a source graph.
Expand Down Expand Up @@ -416,7 +403,7 @@ Constructed graphs are built by explicitly populating them with entities using t
* `REMOVE`
* `[DETACH] DELETE`

An error is raised for any attempt to `SET` labels or properties of cloned entities during graph construction.
An error is raised for any attempt to `SET` or `REMOVE` labels or properties of cloned entities during graph construction.


==== Updating constructed graphs
Expand All @@ -435,6 +422,21 @@ Constructed graphs may only be updated by
An error is raised if an update to a constructed graph leads to a constraint violation in a source graph.


=== Clone patterns

A new type of pattern that is called a *clone pattern* may be used find the clone (if present) for a source entity as determined by provenance tracking.

[source, cypher]
----
MATCH (a)-[r]->(b)
FROM another_graph
MATCH (x CLONE OF b)-[CLONE OF r]->()
...
----

Clone patterns should not be used in updating statements.


=== Graph union

The *common graph union* of two graphs may be computed using the following syntax:
Expand Down Expand Up @@ -540,6 +542,7 @@ The `catalog(g)` function returns the catalog name for the graph identity `g` or

The `catalog()` function returns the catalog name for the working graph or `NULL` if the working graph is a dynamically constructed graph.

// TODO: failIfNull(value, message)


== Examples
Expand Down

0 comments on commit cbb52a8

Please sign in to comment.