Database Reference
In-Depth Information
Keyword
Function
Example
This matches or creates semantics by using
indexes and locks. You can specify different
operations in case of a MATCH (part of the
pattern already existed) or on CREATE
(pattern did not exist yet).
MERGE (me:Person
{name:"My Name"})
ON MATCH me SET
me.accessed =
timestamp()
ON CREATE me SET
me.age = 42
MERGE
SET ,
REMOVE
This updates properties and labels on nodes
and/orrelationships.
SET me.age = 42
SET me:Employee
REMOVE me.first_name
REMOVE me:Contractor
It deletes nodes and relationships.
MATCH (me)
OPTIONAL MATCH (me)-
[r]-() DELETE me, r
DELETE
With these simplekeywords,youshouldbeabletostartformingyourirstCypher
queries. After all, it's a bit like ASCII art, a structure similar to the one shown in the
following diagram:
This is very easily described in Cypher as:
(a:Person {name:"Rik")-[:OWNS]->(b:Device {brand:"LIFX"})
Search WWH ::




Custom Search