Property values

This describes how both nodes and relationships can have properties.

Properties are named values where the name is a string. Property values can be either a primitive or an array of one primitive type. For example String, int, and int[] values are valid for properties.

NULL is not a valid property value. Setting a property to NULL is equivalent to deleting the property.

Table 1. Property value types
Type Description

boolean

byte

8-bit integer.

short

16-bit integer.

int

32-bit integer.

long

64-bit integer.

float

32-bit IEEE 754 floating-point number.

double

64-bit IEEE 754 floating-point number.

char

16-bit unsigned integers representing Unicode characters.

String

Sequence of Unicode characters.

org.neo4j.graphdb.spatial.Point

A 2D or 3D point object in a given coordinate system.

java.time.LocalDate

An instant capturing of the date, but not the time and timezone.

java.time.OffsetTime

An instant capturing of the time of day and the timezone offset, but not the date.

java.time.LocalTime

An instant capturing of the time of day, but not the date and timezone.

java.time.ZonedDateTime

An instant capturing of the date, time, and timezone.

java.time.LocalDateTime

An instant capturing of the date and time, but not the timezone.

java.time.temporal.TemporalAmount

A temporal amount. This captures the difference in time between two instants.

For further details on float/double values, see Java Language Specification.

Note that there are two cases where more than one Java type is mapped to a single Cypher type. When this happens, type information is lost. If these objects are returned from procedures, the original types cannot be recreated:

  • A Cypher Duration is created when either java.time.Duration or java.time.Period is provided. If Duration is returned, only the common interface java.time.temporal.TemporalAmount remains.

  • A Cypher DateTime is created when java.time.OffsetDateTime is provided. If DateTime is returned, it is converted into java.time.ZonedDateTime.

Strings that contain special characters can have inconsistent or non-deterministic ordering in Neo4j. For details, see Cypher Manual → Sorting of special characters.