Using the Cypher syntax
Cypher is like American Standard Code for Information Interchange (ASCII) art. A simple Cypher traversal query can look like this:
(A)-[:LIKES]->(B), (B)-[:LIKES]->(C), (A)-[:LIKES]->(C)
This also can be written as follows:
(A)-[:LIKES]->(B)-[:LIKES]->(C)<-[:LIKES]-(A)
If you notice the syntax, it reads more like a simple statement. A likes B, who likes C, who is also liked by A. Nouns represent nodes and verbs represent relationships.
Cypher supports various data types, which fall into three different categories.
Property types
The following are the different property types available in Cypher:
- Number:
- Integer
- Float
- String
- Boolean
- Spatial:
- Point
- Temporal:
- Date
- Time
- LocalTime
- DateTime
- LocalDateTime
- Duration
Property types can have the following characteristics.
- Can be a part of data returned by queries
- Can be used as input parameters
- Can be stored as properties on nodes or relationships...