2.4 · Lesson

The Neo4j Type System

At this point, you need to know the Full definition for Cypher (opens in a new tab)Neo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. type system to map database entities to domain entities. As Neo4j is written in Java (the j in Neo4j stands for Java, after all), there are only minor discrepancies between the types stored in the Neo4j database and native Java types.

Java TypeNeo4j Cypher TypeNotes
StringString
Long*IntegerSee Integers
DoubleFloatDouble in Java can contain the smaller Float values, so Neo4j Float is mapped to the larger Java Double.
BooleanBoolean
ListListNeo4j can only store a flat array containing strings, booleans, or numbers.
MapMap
ObjectObject
java.time. LocalDateDate
java.time. OffsetTimeTime
java.time. LocalTimeLocalTime
java.time. ZonedDateTimeDateTimeSee Temporal Types
java.time. LocalDateTimeLocalDateTime
java.time.temporal. TemporalAmountDurationSee Temporal Types
org.neo4j. driver.types. PointPointSee Spatial Types
null, nullnull