cypher Getting started with cypher

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

Cypher is a declarative graph query language that allows for expressive and efficient querying and updating of a property graph.

Cypher was originally created by Neo Technology for its graph database Neo4j, but was opened up through the openCypher project in October 2015 and has since been adopted by several other graph database vendors, including SAP HANA and AgensGraph.

Versions

VersionRelease
3.22017-05-11
3.12016-12-13
3.02016-04-26
2.32015-10-21

Keyword Guide

Read Keywords

KeyWordFunctionExample
MATCHFind following expression in graphMATCH (n)

Write Keywords

KeyWordFunctionExample
CREATECreate the following patternCREATE (n:Person{name:"Bob"})
DELETEDelete the following nodes/relationshipsDELETE n
DETACH DELETEDelete the following nodes, and any attached relationshipsDETACH DELETE n

Read-Write Keywords

KeyWordFunctionExample
MergeMatch following pattern, or create itMerge (n:Person{id:1337})

Filter Keywords

KeyWordFunctionExample
LimitLimit result rows to the following number. Combine with Skip to page resultsLimit 25
SkipSkip first n result rows. Combine with Limit to page resultsSkip 25
WHEREFilter results by following expressionWHERE n.age > 21
AND/ORAnd/Or multiple expressionsWHERE n.age > 21 AND n.age < 30
NOTNegate following expressionWHERE NOT n.age > 21
ANY/ALL/NONE/SINGLEFilter based on collectionWHERE ALL (p in people

Remember to check the Refcard for your version of Cypher, as these may have changed.



Got any cypher Question?