Skip to content

Latest commit

 

History

History
5444 lines (4580 loc) · 126 KB

deprecations-additions-removals-compatibility.adoc

File metadata and controls

5444 lines (4580 loc) · 126 KB

Deprecations, additions, and compatibility

Cypher is a language that is constantly evolving. New features are added to the language continuously, and occasionally, some features become deprecated and are subsequently removed.

This section lists all of the features that have been removed, deprecated, added, or extended in different Cypher versions. Replacement syntax for deprecated and removed features are also indicated.

Neo4j 5.26

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

CREATE ... INDEX ... OPTIONS { indexProvider: ... }
CREATE ... CONSTRAINTS ... OPTIONS { indexProvider: ... }

Specifying an index provider in the OPTIONS map when creating an index or constraint is deprecated.

This also means that the vector index index provider, vector-1.0, is deprecated. Use the default index provider, vector-2.0, instead.

label:functionality[] label:deprecated[]

MATCH (where {...})
MATCH (...)-[where {...}]->()

The variable named where (or any casing variant, like WHERE) used in a node or relationship pattern followed directly by a property key-value expression is deprecated. To continue using variables with this name, use backticks to quote the variable name:

  • Node patterns: MATCH (`where` { …​ })

  • Relationship patterns: MATCH (…​)-[`where` { …​ }]→()

label:functionality[] label:deprecated[]

... + n:A
... + n:A&B
... + n:A&B|C

Using an unparenthesized label expression predicate as the right-hand side operand of ` is deprecated. Parenthesize the label expression predicate on the right-hand side of `: …​ + (n:A).

label:functionality[] label:deprecated[]

CASE x ... WHEN is :: STRING THEN ... END

Using a variable named is (or any casing variant, like IS) as a WHEN operand in a simple CASE expression is deprecated. To continue using variables with this name in simple CASE expressions, use backticks to quote the variable name: CASE x …​ WHEN `is` :: STRING THEN …​ END

label:functionality[] label:deprecated[]

CASE x ... WHEN contains + 1 THEN ... END
CASE x ... WHEN contains - 1 THEN ... END

Using a variable named contains (or any casing variant, like CONTAINS) in addition or subtraction operations within a WHEN operand of a simple CASE expression is deprecated. To continue using variables with this name, use backticks to quote the variable name:

  • Additions: CASE x …​ WHEN `contains` + 1 THEN …​ END

  • Subtractions: CASE x …​ WHEN `contains` - 1 THEN …​ END

label:functionality[] label:deprecated[]

CASE x ... WHEN in[1] THEN ... END
CASE x ... WHEN in["abc"] THEN ... END

Using the [] operator on a variable named in (or any casing variant, like IN) within a WHEN operand of a simple CASE expression is deprecated. To continue using variables with this name, use backticks to quote the variable name:

  • CASE x …​ WHEN `in`[1] THEN …​ END

  • CASE x …​ WHEN `in`["abc"] THEN …​ END

label:functionality[] label:deprecated[]

CALL db.schema.nodeTypeProperties() YIELD propertyTypes RETURN propertyTypes;
CALL db.schema.relTypeProperties() YIELD propertyTypes RETURN propertyTypes;

The column propertyTypes currently returned by the procedures db.schema.nodeTypeProperties() and db.schema.relTypeProperties() produces a list of strings representing the potential Java types for a given property. In an upcoming major release of Neo4j, this will be updated to represent the possible Cypher types for that property instead. For all available Cypher types, see the section on types and their synonyms.

label:functionality[] label:deprecated[]

CREATE DATABASE db OPTIONS { seedCredentials: ...,  seedConfig: ... }

The CREATE DATABASE option seedCredentials has been deprecated. For seeding from cloud storage, it is recommended to use CloudSeedProvider which will read cloud credentials and configuration from standard locations. For further information, see Managing databases in a cluster → CloudSeedProvider.

label:functionality[] label:deprecated[]

CREATE DATABASE db OPTIONS { storeFormat: 'standard' }

CREATE DATABASE db OPTIONS { storeFormat: 'high_limit' }

The standard and high_limit store formats have been deprecated. Creating databases with these formats is therefore also deprecated. For more information on the deprecation of these formats, see Store formats → Format deprecations.

Updated features

Feature Details

label:functionality[] label:updated[]

USE graph.byElementId("4:c0a65d96-4993-4b0c-b036-e7ebd9174905:0")
MATCH (n) RETURN n

graph.byElementId() can now be used on both standard and composite databases. Previously it could only be used on composite databases.

label:functionality[] label:updated[]

CREATE DATABASE foo TOPOLOGY $p PRIMARIES $s SECONDARIES
ALTER DATABASE foo SET TOPOLOGY $p PRIMARIES $s SECONDARIES

The CREATE DATABASE and ALTER DATABASE commands now accept parameters for TOPOLOGY configuration.

label:functionality[] label:updated[]

GRANT READ {*} ON GRAPH * FOR (n) WHERE n.createdAt > date('2024-10-25') TO regularUsers

Property-based access control now supports spatial and temporal values.

label:functionality[] label:updated[]

RETURN 'val' as one, 'val' as two
UNION
RETURN 'val' as two, 'val' as one
RETURN 'val' as one, 'val' as two
UNION ALL
RETURN 'val' as two, 'val' as one

Using differently ordered return items in a UNION [ALL] clause has been un-deprecated.

New features

Feature Details

label:functionality[] label:new[]

MATCH (n:$($label)),
      ()-[r:$($type))]->()
CREATE (n:$($label)),
       ()-[r:$($type)]->()
MERGE (n:$($label)),
      ()-[r:$($type)]->()
LOAD CSV WITH HEADERS FROM 'file:///artists-with-headers.csv' AS line
CREATE (n:$(line.label) {name: line.Name})

Added the ability to dynamically reference node labels and relationship types in MATCH, CREATE, and MERGE clauses. Also introduced the ability to specify CSV columns dynamically when using LOAD CSV.

Neo4j 5.25

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

CREATE DATABASE db OPTIONS { existingDataSeedInstance: ... }

The CREATE DATABASE option existingDataSeedInstance has been deprecated and replaced with the option existingDataSeedServer. The functionality is unchanged.

Updated features

Feature Details

label:functionality[] label:updated[]

CREATE (n:Label {property: 'name'}),
()-[r:REL_TYPE]->()

Neo4j’s block format now implements GQL’s limit on the maximum length of identifiers.

The maximum limit is set to 16,383 characters in an identifier. This means that node labels, relationship types, and property keys cannot include more than 16,383 characters.

New features

Feature Details

label:functionality[] label:new[]

CREATE DATABASE db OPTIONS { existingDataSeedServer: ... }

The option existingDataSeedServer has been added to CREATE DATABASE. The functionality is the same as the deprecated option existingDataSeedServer, which this replaces.

Neo4j 5.24

New features

Feature Details

label:functionality[] label:new[]

MATCH (t:Team)
OPTIONAL CALL (t) {
  MATCH (p:Player)-[:PLAYS_FOR]->(t)
  RETURN collect(p) as players
}
RETURN t AS team, players
OPTIONAL CALL db.labels() YIELD label
RETURN label

Introduced OPTIONAL CALL for optionally executing a procedure or subquery CALL. Similar to OPTIONAL MATCH, any empty rows produced by the OPTIONAL CALL will return null and not affect the remainder of the procedure or subquery evaluation.

label:functionality[] label:new[]

MATCH (n)
RETURN n.name AS names OFFSET 2

Introduced OFFSET, a GQL conformant synonym to SKIP.

See OFFSET as a synonym for SKIP for details.

label:functionality[] label:new[]

MATCH (n)
ORDER BY n.name DESC
OFFSET 3
LIMIT 2
RETURN collect(n.name) AS names

Introduced GQL conformant standalone ORDER BY, SKIP/OFFSET, and LIMIT clauses.

label:functionality[] label:new[]

SET n:$(label)
REMOVE n:$(label)

Added the ability to dynamically reference labels in SET and REMOVE clauses.

label:functionality[] label:new[]

SET n[$prop] = "hello world"
REMOVE n[$prop]

Added the ability to dynamically reference properties in SET and REMOVE clauses.

label:functionality[] label:new[]

DROP [COMPOSITE] DATABASE ... [RESTRICT | CASCADE ALIAS[ES]]

Added the ability to drop database aliases while deleting a database. This will affect local database aliases targeting the database and constituent database aliases belonging to the composite database. For more information, see Delete a database with local database aliases targeting it and Delete a composite database with constituent database aliases.

label:functionality[] label:new[]

LOAD CSV FROM 'azb://azb-account/azb-container/artists.csv' AS row
MERGE (a:Artist {name: row[1], year: toInteger(row[2])})
RETURN a.name, a.year

Extension of the LOAD CSV clause to allow loading CSV files from Azure Cloud Storage URIs.

label:functionality[] label:new[]

CREATE USER bob
SET AUTH 'externalProviderName' {
  SET ID 'userIdForExternalProvider'
}
SET AUTH 'native' {
  SET PASSWORD 'password'
  SET PASSWORD CHANGE REQUIRED
}

Added the ability set which auth providers apply to a user (Enterprise Edition).

Administration of the native (username / password) auth via the new syntax is also now supported (Community Edition).

label:functionality[] label:new[]

ALTER USER bob
REMOVE AUTH 'native'
SET AUTH 'externalProviderName' {
  SET ID 'userIdForExternalProvider'
}

Added the ability add and remove user auth providers via the ALTER USER command.

Setting the native (username / password) auth provider via this new syntax is also supported (Community Edition), but removing any auth provider or setting a non-native auth provider is only supported in Enterprise Edition.

label:functionality[] label:new[]

SHOW USERS WITH AUTH

New support for WITH AUTH to allow display users' auth providers with a separate row per user per auth provider.

label:functionality[] label:new[]

SET AUTH

New privilege that allows a user to modify user auth providers. This is a sub-privilege of the ALTER USER privilege. Like all GRANT/DENY commands this is only available in Enterprise Edition.

Neo4j 5.23

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

UNWIND [0, 1, 2] AS x
CALL {
  WITH x
  RETURN x * 10 AS y
}
RETURN x, y

Using the WITH clause to import variables to CALL subqueries is deprecated, and replaced with a variable scope clause. It is also deprecated to use naked subqueries without a variable scope clause.

Updated features

Feature Details

label:functionality[] label:updated[]

RETURN datetime.statement() IS :: TIMESTAMP WITH TIME ZONE

Introduced new GQL conformant aliases to duration types: TIMESTAMP WITHOUT TIME ZONE (alias to LOCAL DATETIME), TIME WITHOUT TIME ZONE (alias to LOCAL TIME), TIMESTAMP WITH TIME ZONE (alias to ZONED DATETIME), and TIME WITH TIME ZONE (alias to ZONED TIME).

See types and their synonyms for more.

New features

Feature Details

label:functionality[] label:new[]

UNWIND [0, 1, 2] AS x
CALL (x) {
   RETURN x * 10 AS y
}
RETURN x, y

Introduced a new variable scope clause to import variables in CALL subqueries.

label:functionality[] label:new[]

CREATE VECTOR INDEX moviePlots IF NOT EXISTS
FOR (m:Movie)
ON m.embedding
OPTIONS {indexConfig: {
`vector.quantization.enabled`: true
`vector.hnsw.m`: 16,
`vector.hnsw.ef_construction`: 100,
}}

Introduced the following configuration settings for vector indexes:

  • vector.quantization.enabled: allows for enabling quantization, which can accelerate search performance but can also slightly decrease accuracy.

  • vector.hnsw.m: controls the maximum number of connections each node has in the index’s internal graph.

  • vector.hnsw.ef_construction: sets the number of nearest neighbors tracked during the insertion of vectors into the index’s internal graph.

Additionally, as of Neo4j 5.23, it is no longer mandatory to configure the settings vector.dimensions and vector.similarity_function when creating a vector index.

Neo4j 5.21

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW FUNCTIONS YIELD *
SHOW PROCEDURES YIELD *

Introduced a deprecatedBy column to SHOW FUNCTIONS and SHOW PROCEDURES. It is not returned by default in either command.

The column is a STRING value specifying a replacement function/procedure if the used function/procedure is deprecated. Otherwise, it returns null.

New features

Feature Details

label:functionality[] label:new[]

GRANT READ {*} ON GRAPH * FOR (n) WHERE n.securityLevel > 3 TO regularUsers
GRANT TRAVERSE ON GRAPH * FOR (n:Email) WHERE n.classification IS NULL TO regularUsers
DENY MATCH {*} ON GRAPH * FOR (n) WHERE n.classification <> 'UNCLASSIFIED' TO regularUsers

Introduction of property-based access control for read privileges. The ability to read, traverse and match nodes based on node property values is now supported in Enterprise Edition.

label:functionality[] label:new[]

LOAD CSV FROM 'gs://gs-bucket/artists.csv' AS row
MERGE (a:Artist {name: row[1], year: toInteger(row[2])})
RETURN a.name, a.year

Extension of the LOAD CSV clause to allow loading CSV files from Google Cloud Storage URIs.

label:functionality[] label:new[]

CYPHER inferSchemaParts=most_selective_label

Introduction of inferSchemaParts, a new Cypher query option that controls the extent to which the Cypher planner will infer predicates.

label:functionality[] label:new[]

RETURN upper('abc'), lower('ABC')

Introduction of a lower() and upper() function. These are aliases of the toLower() and toUpper() functions.

label:functionality[] label:new[]

UNWIND range(1, 10) as i
  CALL {
    WITH i
    CREATE (n:N { i: i })
} IN 3 CONCURRENT TRANSACTIONS OF 2 ROWS

Introduced CALL { …​ } IN CONCURRENT TRANSACTIONS, which uses multiple CPU processors simultaneously to execute batched inner transactions concurrently.

label:functionality[] label:new[]

MATCH SHORTEST 1 (:A)-[:R]->{0,10}(:B)
MATCH p = ANY 2 (:A)-[:R]->{0,10}(:B)
MATCH ALL SHORTEST (:A)-[:R]->{0,10}(:B)
MATCH SHORTEST 2 GROUPS (:A)-[:R]->{0,10}(:B)

Introduced new graph pattern matching keywords to find variations of the shortest paths between nodes.

label:functionality[] label:new[]

New operators:

Introduced new operators to solve SHORTEST queries.

Neo4j 5.20

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

MERGE (a {foo:1})-[:T]->(b {foo:a.foo})

Merging a node or relationship entity, and then referencing that entity in a property definition in the same MERGE clause is deprecated. Split the MERGE clause into two separate clauses instead.

New features

Feature Details

label:syntax[] label:functionality[] label:new[]

RETURN trim(BOTH 'x' FROM 'xxhelloxx'),
       ltrim('xxhello', 'x'),
       rtrim('helloxx', 'x'),
       btrim('xxhelloxx', 'x')

Introduced btrim() function, which returns the given STRING with leading and trailing trimCharacterString characters removed. Also extended the trim(), ltrim(), and rtrim() functions to accept alternative trim character strings.

Neo4j 5.19

New features

Feature Details

label:functionality[] label:new[]

RETURN "Hello" || " " || "World";

RETURN [1, 2] || [3, 4, 5];

Added a new STRING and LIST concatenation operator.

label:functionality[] label:new[]

FINISH

New FINISH clause, which can be optionally used to define a query that returns no result.

label:functionality[] label:new[]

RETURN 1 AS a
UNION DISTINCT
RETURN 1 AS a

The keyword DISTINCT can now be added after a UNION as the explicit form of a UNION with duplicate removal.

label:functionality[] label:new[]

LOAD CSV FROM 's3://artists.csv' AS row
MERGE (a:Artist {name: row[1], year: toInteger(row[2])})
RETURN a.name, a.year

Extension of the LOAD CSV clause to allow loading CSV files from AWS S3 URIs.

label:functionality[] label:new[]

  • "textembedding-gecko@002"

  • "textembedding-gecko@003"

  • "textembedding-gecko-multilingual@001"

Added support for additional Vertex AI vector encoding models. Also added support for Vertex AI taskType and title embedding parameters.

Neo4j 5.18

New features

Feature Details

label:functionality[] label:new[]

INSERT

Added a new keyword INSERT, which can be used as a synonym to CREATE for creating nodes and relationships.

label:functionality[] label:new[]

MATCH (n)
RETURN CASE n.prop
        WHEN IS NULL THEN "Null"
        WHEN < 0 THEN "Negative"
        WHEN 2, 4, 6, 8 THEN "Even"
        ELSE "Odd"
        END

Extension of the simple CASE expression, allowing multiple matching values to be comma-separated in the same WHEN statement. The simple CASE uses an implied equals (=) comparator, and this extension additionally allows other comparison predicates to be explicitly specified before the matching value in an extended version of the simple CASE.

label:functionality[] label:new[]

CREATE VECTOR INDEX [index_name] [IF NOT EXISTS]
FOR ()-[r:REL_TYPE]-() ON (r.property)
OPTIONS {indexConfig: {
 `vector.dimensions`: $dimension,
 `vector.similarity_function`: $similarityFunction
}}

Added command to create relationship vector indexes. The index configuration settings vector.dimensions and vector.similarity_function are mandatory when using this command. The command allows for the IF NOT EXISTS flag to skip index creation should the index already exist.

label:functionality[] label:new[]

RETURN vector.similarity.euclidean(a, b)
RETURN vector.similarity.cosine(a, b)

Introduction of vector similarity functions. These functions return a FLOAT representing the similarity of vectors a and b.

Neo4j 5.17

Updated features

Feature Details

label:functionality[] label:updated[]

CREATE [index_type] INDEX [index_name] IF NOT EXISTS FOR ...

When attempting to create an index using IF NOT EXISTS with either the same name or same index type and schema, or both, as an existing index the command now returns a notification showing the existing index which blocks the creation.

label:functionality[] label:updated[]

CREATE CONSTRAINT [constraint_name] IF NOT EXISTS FOR ...

When attempting to create a constraint using IF NOT EXISTS with either the same name or same constraint type and schema (and property type for property type constraints), or both, as an existing constraint the command now returns a notification showing the existing constraint which blocks the creation.

label:functionality[] label:updated[]

DROP CONSTRAINT constraint_name IF EXISTS

When attempting to drop a non-existing index using IF EXISTS the command will now return a notification about the index not existing.

label:functionality[] label:updated[]

DROP INDEX index_name IF EXISTS

When attempting to drop a non-existing constraint using IF EXISTS the command will now return a notification about the constraint not existing.

New features

Feature Details

label:functionality[] label:new[]

RETURN normalize("string", NFC)

Introduction of a normalize() function. This function normalizes a STRING according to the specified normalization form, which can be of type NFC, NFD, NFKC, or NFKD.

label:functionality[] label:new[]

IS [NOT] [NFC | NFD | NFKC | NFKD] NORMALIZED
RETURN "string" IS NORMALIZED

Introduction of an IS NORMALIZED operator. The operator can be used to check if a STRING is normalized according to the specified normalization form, which can be of type NFC, NFD, NFKC, or NFKD.

label:functionality[] label:new[]

New operators:

  • PartitionedAllNodesScan

  • PartitionedDirectedAllRelationshipsScan

  • PartitionedDirectedRelationshipIndexScan

  • PartitionedDirectedRelationshipIndexSeek

  • PartitionedDirectedRelationshipIndexSeekByRange

  • PartitionedDirectedUnionRelationshipTypesScan

  • PartitionedNodeByLabelScan

  • PartitionedNodeIndexScan

  • PartitionedNodeIndexSeek

  • PartitionedNodeIndexSeekByRange

  • PartitionedUndirectedAllRelationshipsScan

  • PartitionedUndirectedRelationshipIndexScan

  • PartitionedUndirectedRelationshipIndexSeek

  • PartitionedUndirectedRelationshipIndexSeekByRange

  • PartitionedUndirectedRelationshipTypeScan

  • PartitionedUndirectedUnionRelationshipTypesScan

  • PartitionedUnionNodeByLabelsScan

  • PartitionedUnwind

Introduction of partitioned operators used by the parallel runtime. These operators segment the data and operate on each segment in parallel

Neo4j 5.16

Updated features

Feature Details

label:functionality[] label:updated[]

CREATE [index_type] INDEX $name [IF NOT EXISTS] FOR ...

DROP INDEX $name [IF EXISTS]

Added the ability to use parameters for the index name in the CREATE and DROP commands.

label:functionality[] label:updated[]

CREATE CONSTRAINT $name [IF NOT EXISTS] FOR ...

DROP CONSTRAINT $name [IF EXISTS]

Added the ability to use parameters for the constraint name in the CREATE and DROP commands.

New features

Feature Details

label:functionality[] label:new[]

GRANT LOAD ON CIDR "127.0.0.1/32" TO role
DENY LOAD ON CIDR "::1/128" TO role

Added the ability to grant or deny LOAD privilege on a CIDR range. For more information, see the Operations Manual → The CIDR privilege.

Neo4j 5.15

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

RETURN 1 as my\u0085identifier

The Unicode character `\u0085` is deprecated for identifiers not quoted in backticks and will be considered as a whitespace character in the future. To continue using it, quote the identifier with backticks. This applies to all identifiers in Cypher, such as label expressions, properties, variable names or parameters. In the given example, the quoted identifier would be `my�identifier`.

label:functionality[] label:deprecated[]

RETURN 1 as my$Identifier

The character with the Unicode representation `\u0024` is deprecated for identifiers not quoted in backticks and will not be supported in the future. To continue using it, quote the identifier with backticks. This applies to all identifiers in Cypher, such as label expressions, properties, variable names or parameters. In the given example, the quoted identifier would be `my$identifier`.

The following Unicode Characters are deprecated in identifiers: '\u0000', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005', '\u0006', '\u0007', '\u0008', '\u000E', '\u000F', '\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019', '\u001A', '\u001B', '\u007F', '\u0080', '\u0081', '\u0082', '\u0083', '\u0084', '\u0086', '\u0087', '\u0088', '\u0089', '\u008A', '\u008B', '\u008C', '\u008D', '\u008E', '\u008F', '\u0090', '\u0091', '\u0092', '\u0093', '\u0094', '\u0095', '\u0096', '\u0097', '\u0098', '\u0099', '\u009A', '\u009B', '\u009C', '\u009D', '\u009E', '\u009F', '\u0024', '\u00A2', '\u00A3', '\u00A4', '\u00A5', '\u00AD', '\u0600', '\u0601', '\u0602', '\u0603', '\u0604', '\u0605', '\u061C', '\u06DD', '\u070F', '\u08E2', '\u180E', '\u200B', '\u200C', '\u200D', '\u200E', '\u200F', '\u202A', '\u202B', '\u202C', '\u202D', '\u202E', '\u2060', '\u2061', '\u2062', '\u2063', '\u2064', '\u2066', '\u2067', '\u2068', '\u2069', '\u206A', '\u206B', '\u206C', '\u206D', '\u206E', '\u206F', '\u2E2F', '\uFEFF', '\uFFF9', '\uFFFA', '\uFFFB'

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW VECTOR INDEXES

Extended SHOW INDEXES with easy filtering for vector indexes. This is equivalent to SHOW INDEXES WHERE type = 'VECTOR'.

label:functionality[] label:updated[]

MATCH (n:Label) WHERE $param IS :: STRING NOT NULL AND n.prop = $param

IS :: STRING NOT NULL is now an index-compatible predicate.

New features

Feature Details

label:functionality[] label:new[]

MATCH (n)
RETURN count(ALL n.prop)

Added a new keyword ALL, explicitly defining that the aggregate function is not DISTINCT. This is a mirror of the already existing keyword DISTINCT for functions.

label:functionality[] label:new[]

CREATE VECTOR INDEX [index_name] [IF NOT EXISTS]
FOR (n: Label) ON (n.property)
OPTIONS {indexConfig: {
 `vector.dimensions`: $dimension,
 `vector.similarity_function`: $similarityFunction
}}

Added command to create node vector indexes, replacing the db.index.vector.createNodeIndex procedure. The index configuration settings vector.dimensions and vector.similarity_function are mandatory when using this command. The command allows for the IF NOT EXISTS flag to skip index creation should the index already exist.

Neo4j 5.14

Updated features

Feature Details

label:functionality[] label:updated[]

IS :: INTEGER!

Extended type syntax to allow an exclamation mark ! as a synonym for NOT NULL.

New features

Feature Details

label:functionality[] label:new[]

RETURN nullIf(v1, v2)

Introduction of a nullIf() function. This function returns null if the two given parameters are equivalent, otherwise returns the value of the first parameter.

label:functionality[] label:new[]

MATCH (n) NODETACH DELETE n

Added a new keyword NODETACH, explicitly defining that relationships will not be detached and deleted. This is a mirror of the already existing keyword DETACH.

Neo4j 5.13

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW FUNCTIONS YIELD *
SHOW PROCEDURES YIELD *

Updated the signatures column in SHOW FUNCTIONS and SHOW PROCEDURES.

Procedure signatures now follow the pattern: "procedureName(param1 :: TYPE, param2 :: TYPE, .., paramN :: TYPE) :: (returnParam1 :: TYPE, returnParam2, .., returnParamN :: TYPE)"

The signature for procedures with no return columns now follows the pattern: "procedureName(param1 :: TYPE, param2 :: TYPE, .., paramN :: TYPE)"

Function signatures now follow the pattern: "functionName(param1 :: TYPE, param2 :: TYPE, .., paramN :: TYPE) :: TYPE"

For all available Cypher types, see the section on types and their synonyms.

New features

Feature Details

label:functionality[] label:new[] label:beta[]

CALL cdc.current()
CALL cdc.earliest()
CALL cdc.query(from, selectors)

Introduction of the Change Data Capture (CDC) feature. For details, see Change Data Capture.

label:functionality[] label:new[]

RETURN valueType(expr)

Introduction of a valueType() function. This function returns a STRING representation of the most precise value type that the given expression evaluates to.

label:functionality[] label:new[]

RETURN char_length(expr)

Introduction of a char_length() function. This function returns the number of Unicode characters in a STRING. It is an alias of the size() function.

label:functionality[] label:new[]

RETURN character_length(expr)

Introduction of a character_length() function. This function returns the number of Unicode characters in a STRING. It is an alias of the size() function.

label:functionality[] label:new[]

New privilege:

GRANT LOAD ON ALL DATA TO `role`

New privilege that controls a user’s ability to load data. Unlike other privileges, these are not granted, denied, or revoked on graphs, databases, or the DBMS, but instead on ALL DATA.

label:functionality[] label:new[]

USE graph.byElementId(elementId :: STRING)

New graph function, graph.byElementId(), that resolves the constituent graph to which a given element id belongs.

label:functionality[] label:new[]

CYPHER runtime = parallel

Introduction of the parallel runtime. This runtime is designed for analytical, graph-global read queries run on machines with several available CPUs.

Neo4j 5.12

New features

Feature Details

label:functionality[] label:new[]

db.nameFromElementId(elementId :: STRING) :: STRING

New database function to return database names from element ids.

Neo4j 5.11

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW ALIASES

Introduced a new column composite to SHOW ALIASES. This column is returned by default.

The column returns the name of the composite database that the alias belongs to, or null if the alias does not belong to a composite database.

label:functionality[] label:updated[]

IS [NOT] :: <TYPE>

Extended type predicate expressions. Closed dynamic union types (type1 | type2 | …​) are now supported. For example, the following query which evaluates to true if a value is either of type INTEGER or FLOAT:

IS :: INTEGER | FLOAT

label:functionality[] label:updated[]

CREATE CONSTRAINT name FOR (n:Label) REQUIRE n.prop IS :: <PROPERTY TYPE>

CREATE CONSTRAINT name FOR ()-[r:TYPE]-() REQUIRE r.prop IS :: <PROPERTY TYPE>

Extended node and relationship property type constraints. Closed dynamic union types (type1 | type2 | …​) are now supported, allowing for types such as:

  • INTEGER | FLOAT

  • LIST<STRING NOT NULL> | STRING

  • ZONED DATETIME | LOCAL DATETIME

label:functionality[] label:updated[]

ALTER CURRENT USER
SET PASSWORD FROM 'password1' TO 'password2'

This command now auto-commits even when executed inside an explicit transaction.

Neo4j 5.10

Updated features

Feature Details

label:functionality[] label:updated[]

IS [NOT] :: <TYPE>

Extended type predicate expressions. The newly supported types are:

  • NOTHING

  • NULL

  • BOOLEAN NOT NULL

  • STRING NOT NULL

  • INTEGER NOT NULL

  • FLOAT NOT NULL

  • DATE NOT NULL

  • LOCAL TIME NOT NULL

  • ZONED TIME NOT NULL

  • LOCAL DATETIME NOT NULL

  • ZONED DATETIME NOT NULL

  • DURATION NOT NULL

  • POINT NOT NULL

  • NODE

  • NODE NOT NULL

  • RELATIONSHIP

  • RELATIONSHIP NOT NULL

  • MAP

  • MAP NOT NULL

  • LIST<TYPE>

  • LIST<TYPE> NOT NULL

  • PATH

  • PATH NOT NULL

  • PROPERTY VALUE

  • PROPERTY VALUE NOT NULL

  • ANY

  • ANY NOT NULL

label:functionality[] label:updated[]

CREATE CONSTRAINT name FOR (n:Label) REQUIRE n.prop IS :: <PROPERTY TYPE>

CREATE CONSTRAINT name FOR ()-[r:TYPE]-() REQUIRE r.prop IS :: <PROPERTY TYPE>

Extended node and relationship property type constraints. The new supported types are:

  • LIST<BOOLEAN NOT NULL>

  • LIST<STRING NOT NULL>

  • LIST<INTEGER NOT NULL>

  • LIST<FLOAT NOT NULL>

  • LIST<DATE NOT NULL>

  • LIST<LOCAL TIME NOT NULL>

  • LIST<ZONED TIME NOT NULL>

  • LIST<LOCAL DATETIME NOT NULL>

  • LIST<ZONED DATETIME NOT NULL>

  • LIST<DURATION NOT NULL>

  • LIST<POINT NOT NULL>

Neo4j 5.9

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

CREATE (a {foo:1}), (b {foo:a.foo})

Creating a node or relationship entity, and then referencing that entity in a property definition in the same CREATE clause is deprecated. Split the CREATE clause into two separate clauses instead.

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW SETTINGS YIELD *
SHOW FUNCTIONS YIELD *
SHOW PROCEDURES YIELD *

Introduced an isDeprecated column to SHOW SETTINGS, SHOW FUNCTIONS, and SHOW PROCEDURES. It is not returned by default in either command.

The column is true if the setting/function/procedure is deprecated and false otherwise.

label:functionality[] label:updated[]

SHOW FUNCTIONS YIELD argumentDescription
SHOW PROCEDURES YIELD argumentDescription, returnDescription

Introduced an isDeprecated field to the argument and return description maps for SHOW FUNCTIONS and SHOW PROCEDURES.

The field is true if the argument/return value is deprecated and false otherwise.

label:functionality[] label:updated[]

SHOW CONSTRAINTS

Introduced propertyType column, which is returned by default. It returns a STRING representation of the property type for property type constraints, and null for other constraints.

New features

Feature Details

label:functionality[] label:new[]

MATCH ((x:A)-[:R]->(z:B WHERE z.h > x.h)){1,5}

Introduction of quantified path patterns - a new method in graph pattern matching for matching paths of a variable length. More information can be found here.

label:functionality[] label:new[]

New operator: Repeat(Trail)

The Repeat(Trail) operator is used to solve quantified path patterns. More information can be found here.

label:functionality[] label:new[]

IS [NOT] :: <TYPE>

Added type predicate expressions. The available types are:

  • BOOLEAN

  • STRING

  • INTEGER

  • FLOAT

  • DATE

  • LOCAL TIME

  • ZONED TIME

  • LOCAL DATETIME

  • ZONED DATETIME

  • DURATION

  • POINT

label:functionality[] label:new[]

CREATE CONSTRAINT name FOR (n:Label) REQUIRE n.prop IS :: <PROPERTY TYPE>

CREATE CONSTRAINT name FOR ()-[r:TYPE]-() REQUIRE r.prop IS :: <PROPERTY TYPE>

Added node and relationship property type constraints. The available property types are:

  • BOOLEAN

  • STRING

  • INTEGER

  • FLOAT

  • DATE

  • LOCAL TIME

  • ZONED TIME

  • LOCAL DATETIME

  • ZONED DATETIME

  • DURATION

  • POINT

label:functionality[] label:new[]

SHOW NODE PROPERTY TYPE CONSTRAINTS

SHOW REL[ATIONSHIP] PROPERTY TYPE CONSTRAINTS

SHOW PROPERTY TYPE CONSTRAINTS

Added filtering for the new property constraints to SHOW CONSTRAINTS. Includes filtering for the node part, relationship part, or both parts.

label:functionality[] label:new[]

SHOW SUPPORTED PRIVILEGE[S]

List supported privileges on the current server.

Neo4j 5.8

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW INDEXES

Introduced lastRead, readCount, and trackedSince columns. Both lastRead and readCount are returned by default.

The lastRead column returns the last time the index was used for reading. The readCount column returns the number of read queries that have been issued to this index. The trackedSince column returns the time when usage statistics tracking started for this index.

New features

Feature Details

label:functionality[] label:new[]

New operator: AssertSameRelationship

The AssertSameRelationship operator is used to ensure that no relationship property uniqueness constraints are violated in the slotted and interpreted runtime. More information can be found here.

Neo4j 5.7

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

CYPHER connectComponentsPlanner=greedy MATCH (a), (b) RETURN *
CYPHER connectComponentsPlanner=idp MATCH (a), (b) RETURN *

The Cypher query option connectComponentsPlanner is deprecated and will be removed without a replacement. The product’s default behavior of using a cost-based IDP search algorithm when combining sub-plans will be kept.

Updated features

Feature Details

label:functionality[] label:updated[]

ALTER DATABASE ... [WAIT [n [SEC[OND[S]]]]|NOWAIT]

New sub-clause WAIT for ALTER DATABASE. This enables adding a waiting clause to specify a time limit in which the command must be completed and returned.

label:functionality[] label:new[]

CREATE CONSTRAINT name FOR ()-[r:TYPE]-() REQUIRE r.prop IS UNIQUE

CREATE CONSTRAINT name FOR ()-[r:TYPE]-() REQUIRE r.prop IS RELATIONSHIP KEY

Added relationship key and property uniqueness constraints.

label:functionality[] label:new[]

SHOW NODE UNIQUE[NESS] CONSTRAINTS

SHOW REL[ATIONSHIP] UNIQUE[NESS] CONSTRAINTS

SHOW UNIQUE[NESS] CONSTRAINTS

SHOW REL[ATIONSHIP] KEY CONSTRAINTS

SHOW KEY CONSTRAINTS

Added filtering for the new constraint types to SHOW CONSTRAINTS. Includes filtering for the node part, relationship part, or both parts of each type (NODE KEY filtering already exists previously).

The existing UNIQUENESS filter will now return both node and relationship property uniqueness constraints.

New features

Feature Details

label:functionality[] label:new[]

CALL {
  <inner>
} IN TRANSACTIONS [ OF <num> ROWS ]
  [ ON ERROR CONTINUE / BREAK / FAIL ]
  [ REPORT STATUS AS <v> ]

New fine-grained control mechanism to control how an inner transaction impacts subsequent inner and/or outer transactions.

  • ON ERROR CONTINUE - will ignore errors and continue with the execution of subsequent inner transactions when one of them fails.

  • ON ERROR BREAK - will ignore an error and stop the execution of subsequent inner transactions.

  • ON ERROR FAIL - will fail in case of an error.

  • REPORT STATUS AS <v> - reports the execution status of the inner transaction (a map value including the fields started committed, transactionId, and errorMessage). This flag is disallowed for ON ERROR FAIL.

Neo4j 5.6

New features

Feature Details

label:functionality[] label:new[]

server.tag

New functionality to change tags at runtime via ALTER SERVER. More information can be found in the Operations Manual → ALTER SERVER options.

label:functionality[] label:new[]

COLLECT {
    ...
}

New expression which returns the results of a subquery collected in a list.

label:functionality[] label:new[]

SHOW SETTING[S] [setting-name[,...]]
[YIELD { * | field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
[WHERE expression]
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]

List configuration settings on the current server.

The setting-name is either a comma-separated list of one or more quoted STRING values or a single expression resolving to a STRING or a LIST<STRING>`.

label:functionality[] label:new[]
New privilege:

SHOW SETTING[S] name-globbing[,...]

New privilege that controls a user’s access to desired configuration settings.

Neo4j 5.5

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

RETURN 'val' as one, 'val' as two
UNION
RETURN 'val' as two, 'val' as one
RETURN 'val' as one, 'val' as two
UNION ALL
RETURN 'val' as two, 'val' as one

Using differently ordered return items in a UNION [ALL] clause is deprecated. Replaced by:

RETURN 'val' as one, 'val' as two
UNION
RETURN 'val' as one, 'val' as two
RETURN 'val' as one, 'val' as two
UNION ALL
RETURN 'val' as one, 'val' as two

New features

Feature Details

label:functionality[] label:new[]

New operator: IntersectionNodeByLabelsScan

The IntersectionNodeByLabelsScan operator fetches all nodes that have all of the provided labels from the node label index. More information can be found here.

Neo4j 5.3

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW DATABASES

Changes to the visibility of databases hosted on offline servers.

For such databases:

  • The address column will return NULL.

  • The currentStatus column will return unknown.

  • The statusMessage will return Server is unavailable.

label:functionality[] label:updated[]

EXISTS {
    ...
}

An EXISTS subquery now supports any non-writing query. For example, it now supports UNION and CALL clauses.

label:functionality[] label:updated[]

COUNT {
    ...
}

A COUNT subquery now supports any non-writing query. For example, it now supports UNION and CALL clauses.

label:functionality[] label:updated[]

SHOW UNIQUE[NESS] CONSTRAINTS

The property uniqueness constraint type filter now allow both UNIQUE and UNIQUENESS keywords.

New features

Feature Details

label:functionality[] label:new[]

New operator: NodeByElementIdSeek

The NodeByElementIdSeek operator reads one or more nodes by ID from the node store, specified via the function elementId(). More information can be found here.

Neo4j 5.2

Updated features

Feature Details

label:functionality[] label:updated[]

CREATE COMPOSITE DATABASE name OPTIONS {}

Creating composite databases now allows for an empty options clause. There are no applicable option values for composite databases.

label:functionality[] label:new[]

DRYRUN REALLOCATE|DEALLOCATE DATABASES FROM <serverId>

To preview of the result of either REALLOCATE or DEALLOCATE without executing, prepend the command with DRYRUN.

Neo4j 5.1

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

CREATE TEXT INDEX ... OPTIONS {indexProvider: `text-1.0`}

The text index provider text-1.0 is deprecated and replaced by text-2.0.

Updated features

Feature Details

label:functionality[] label:updated[]

CREATE TEXT INDEX ... OPTIONS {indexProvider: `text-2.0`}

A new text index provider is available, text-2.0. This is also the default provider if none is given.

Neo4j 5.0

Removed features

Feature Details

label:functionality[] label:removed[]

SHOW EXISTS CONSTRAINTS
SHOW NODE EXISTS CONSTRAINTS
SHOW RELATIONSHIP EXISTS CONSTRAINTS

Replaced by:

SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS
SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS
SHOW REL[ATIONSHIP] [PROPERTY] EXIST[ENCE] CONSTRAINTS

label:functionality[] label:removed[]

SHOW INDEXES BRIEF
SHOW CONSTRAINTS BRIEF

Replaced by:

SHOW INDEXES
SHOW CONSTRAINTS

label:functionality[] label:removed[]

SHOW INDEXES VERBOSE
SHOW CONSTRAINTS VERBOSE

Replaced by:

SHOW INDEXES YIELD *
SHOW CONSTRAINTS YIELD *

label:functionality[] label:removed[]

DROP INDEX ON :Label(prop)

Replaced by:

DROP INDEX name

label:functionality[] label:removed[]

DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS NODE KEY
DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS UNIQUE
DROP CONSTRAINT ON (n:Label) ASSERT exists(n.prop)
DROP CONSTRAINT ON ()-[r:Type]-() ASSERT exists(r.prop)

Replaced by:

DROP CONSTRAINT name

label:functionality[] label:removed[]

CREATE INDEX ON :Label(prop)

Replaced by:

CREATE INDEX FOR (n:Label) ON (n.prop)

label:functionality[] label:removed[]

CREATE CONSTRAINT ON ... ASSERT ...

Replaced by:

CREATE CONSTRAINT FOR ... REQUIRE ...

label:functionality[] label:removed[]

CREATE BTREE INDEX ...

label:functionality[] label:removed[]

CREATE INDEX
...
OPTIONS "{" btree-option: btree-value[, ...] "}"

B-tree indexes are removed.

B-tree indexes used for STRING predicates are replaced by:

CREATE TEXT INDEX ...

B-tree indexes used for spatial queries are replaced by:

CREATE POINT INDEX ...

B-tree indexes used for general queries or property value types are replaced by:

CREATE [RANGE] INDEX ...

These new indexes may be combined for multiple use cases.

label:functionality[] label:removed[]

SHOW BTREE INDEXES

B-tree indexes are removed.

Replaced by:

SHOW {POINT | RANGE | TEXT} INDEXES

label:functionality[] label:removed[]

USING BTREE INDEXES

B-tree indexes are removed.

Replaced by:

USING {POINT | RANGE | TEXT} INDEX

label:functionality[] label:removed[]

CREATE CONSTRAINT
...
OPTIONS "{" btree-option: btree-value[, ...] "}"

Node key and property uniqueness constraints backed by B-tree indexes are removed.

Replaced by:

CREATE CONSTRAINT ...

Constraints used for STRING properties require an additional text index to cover the STRING predicates properly. Constraints used for point properties require an additional point index to cover the spatial queries properly.

label:functionality[] label:removed[]

SHOW INDEXES YIELD uniqueness

The uniqueness output has been removed along with the concept of index uniqueness, as it actually belongs to the constraint and not the index.

The new column owningConstraint was introduced to indicate whether an index belongs to a constraint or not.

label:functionality[] label:removed[]

SHOW CONSTRAINTS YIELD ownedIndexId

The ownedIndexId output has been removed and replaced by the new ownedIndex column.

label:functionality[] label:removed[]
For privilege commands:

ON DEFAULT DATABASE

Replaced by:

ON HOME DATABASE

label:functionality[] label:removed[]
For privilege commands:

ON DEFAULT GRAPH

Replaced by:

ON HOME GRAPH

label:functionality[] label:removed[]

SHOW TRANSACTIONS YIELD allocatedBytes

The allocatedBytes output has been removed, because it was never tracked and thus was always 0.

label:functionality[] label:removed[]

exists(prop)

Replaced by:

prop IS NOT NULL

label:functionality[] label:removed[]

NOT exists(prop)

Replaced by:

prop IS NULL

label:functionality[] label:removed[]

0...

Replaced by 0o....

label:functionality[] label:removed[]

0X...

Only 0x... (lowercase x) is supported.

label:functionality[] label:removed[]

MATCH ()-[r]-()
RETURN [ ()-[r]-()-[r]-() | r ] AS rs

Remaining support for repeated relationship variables is removed.

label:functionality[] label:removed[]

WHERE [1,2,3]

Automatic coercion of a list to a boolean is removed.

Replaced by:

WHERE NOT isEmpty([1, 2, 3])

label:functionality[] label:removed[]

distance(n.prop, point({x:0, y:0})

Replaced by:

point.distance(n.prop, point({x:0, y:0})

label:functionality[] label:removed[]

point({x:0, y:0}) <= point({x:1, y:1}) <= point({x:2, y:2})

The ability to use operators <, <=, >, or >= on spatial points is removed. Instead, use:

point.withinBBox(point({x:1, y:1}), point({x:0, y:0}), point({x:2, y:2}))

label:functionality[] label:removed[]

USING PERIODIC COMMIT ...

Replaced by:

CALL {
  ...
} IN TRANSACTIONS

label:functionality[] label:removed[]

CREATE (a {prop:7})-[r:R]->(b {prop: a.prop})

It is no longer allowed to have CREATE clauses in which a variable introduced in the pattern is also referenced from the same pattern.

label:functionality[] label:removed[]

CALL { RETURN 1 }

Unaliased expressions are no longer supported in subquery RETURN clauses. Replaced by:

CALL { RETURN 1 AS one }

label:functionality[] label:removed[]

MATCH (a) RETURN (a)--()

Pattern expressions producing lists of paths are no longer supported, but they can still be used as existence predicates, for example in WHERE clauses. Instead, use a pattern comprehension:

MATCH (a) RETURN [p=(a)--() | p]

label:functionality[] label:removed[]

MATCH (n) RETURN n.propertyName_1, n.propertyName_2 + count(*)

Implied grouping keys are no longer supported. Only expressions that do not contain aggregations are still considered grouping keys. In expressions that contain aggregations, the leaves must be either:

  • An aggregation

  • A literal

  • A parameter

  • A variable, ONLY IF it is either: 1) A projection expression on its own (e.g. the n in RETURN n AS myNode, n.value + count(*))
    2) A local variable in the expression (e.g the x in RETURN n, n.prop + size([ x IN range(1, 10) | x ])

  • Property access, ONLY IF it is also a projection expression on its own (e.g. the n.prop in RETURN n.prop, n.prop + count(*))

  • Map access, ONLY IF it is also a projection expression on its own (e.g. the map.prop in WITH {prop: 2} AS map RETURN map.prop, map.prop + count(*))

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

MATCH (n)-[r:REL]->(m) SET n=r

Use the properties() function instead to get the map of properties of nodes/relationships that can then be used in a SET clause:

MATCH (n)-[r:REL]->(m) SET n=properties(r)

label:functionality[] label:deprecated[]

MATCH (a), (b), allShortestPaths((a)-[r]->(b)) RETURN b

MATCH (a), (b), shortestPath((a)-[r]->(b)) RETURN b

shortestPath and allShortestPaths without variable-length relationship are deprecated. Instead, use a MATCH with a LIMIT of 1 or:

MATCH (a), (b), shortestPath((a)-[r*1..1]->(b)) RETURN b

label:functionality[] label:deprecated[]

CREATE DATABASE databaseName.withDot ...

Creating a database with dots in the name has been deprecated, instead quote the database name using backticks:

CREATE DATABASE `databaseName.withDot` ...

label:functionality[] label:deprecated[]

()-[:A|:B]->()

Replaced by:

()-[:A|B]->()

Updated features

Feature Details

label:functionality[] label:updated[]

CREATE INDEX ...

The default index type is changed from B-tree to range index.

label:functionality[] label:updated[]

SHOW INDEXES

The new column owningConstraint was added and will be returned by default from now on. It will list the name of the constraint that the index is associated with or null, in case it is not associated with any constraint.

label:functionality[] label:updated[]

SHOW CONSTRAINTS

The new column ownedIndex was added and will be returned by default from now on. It will list the name of the index associated with the constraint or null, in case no index is associated with it.

label:functionality[] label:updated[]

SHOW TRANSACTIONS YIELD *

New columns for the current query are added:

  • currentQueryStartTime

  • currentQueryStatus

  • currentQueryActiveLockCount

  • currentQueryElapsedTime

  • currentQueryCpuTime

  • currentQueryWaitTime

  • currentQueryIdleTime

  • currentQueryAllocatedBytes

  • currentQueryPageHits

  • currentQueryPageFaults

These columns are only returned in the full set (with YIELD) and not by default.

label:functionality[] label:updated[]

TERMINATE TRANSACTIONS transaction-id[,...]
YIELD { * | field[, ...] }
[ORDER BY field[, ...]]
[SKIP n]
[LIMIT n]
[WHERE expression]
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]

Terminate transaction now allows YIELD. The WHERE clause is not allowed on its own, as it is for SHOW, but needs the YIELD clause.

label:functionality[] label:updated[]

SHOW TRANSACTIONS [transaction-id[,...]]
TERMINATE TRANSACTIONS transaction-id[,...]

transaction-id now allows general expressions resolving to a STRING or LIST<STRING> instead of just parameters.

label:functionality[] label:updated[]

SHOW TRANSACTIONS [transaction-id[,...]]
YIELD field[, ...]
  [ORDER BY field[, ...]]
  [SKIP n]
  [LIMIT n]
  [WHERE expression]
TERMINATE TRANSACTIONS transaction-id[,...]
YIELD field[, ...]
  [ORDER BY field[, ...]]
  [SKIP n]
  [LIMIT n]
  [WHERE expression]
RETURN field[, ...]
  [ORDER BY field[, ...]]
  [SKIP n]
  [LIMIT n]

The SHOW and TERMINATE TRANSACTIONS commands can be combined in the same query. The query does not require a specific order and there can be zero or more of each command type, however at least one command is needed.

When the command is not in standalone mode, the YIELD and RETURN clauses are mandatory. YIELD * is not allowed.

transaction-id is a comma-separated list of one or more quoted STRING values. It could also be an expression resolving to a STRING or a LIST<STRING> (for example the output column from SHOW).

label:functionality[] label:updated[]

GRANT EXECUTE BOOSTED PROCEDURE ...
GRANT EXECUTE BOOSTED FUNCTION ...

Not a syntax change but a semantic one. The EXECUTE BOOSTED privilege will no longer include an implicit EXECUTE privilege when granted. That means that to execute a procedure or a function with boosted privileges both EXECUTE and EXECUTE BOOSTED are needed.

label:functionality[] label:updated[]

[GRANT|DENY] [IMMUTABLE] ...

Privileges can be specified as IMMUTABLE, which means that they cannot be altered by users with Privilege Management. They can only be administered with auth disabled.

label:functionality[] label:updated[]

REVOKE [IMMUTABLE] ...

IMMUTABLE can now be specified with the REVOKE command to specify that only immutable privileges should be revoked.

label:functionality[] label:updated[]

SHOW DATABASES

Changes to the default columns in the result:

  • The writer, type, and constituents columns have been added.

  • The values returned in the role column have changes to be just primary, secondary, or unknown.

  • The error column has been renamed to statusMessage.

The following columns have been added to the full result set (with YIELD) and not by default:

  • creationTime

  • lastStartTime

  • lastStopTime

  • store

  • currentPrimariesCount

  • currentSecondariesCount

  • requestedPrimariesCount

  • requestedSecondariesCount

label:functionality[] label:updated[]

MATCH (n)
RETURN
CASE n.prop
    WHEN null THEN 'one'
    ELSE 'two'
END

Previously, if n.prop is null, 'one' would be returned. Now, 'two' is returned.

This is a semantic change only. Since null = null returns false in Cypher, a WHEN expression no longer matches on null.

If matching on null is required, please use IS NULL instead:

MATCH (n)
RETURN
CASE
    WHEN n.prop IS NULL THEN 'one'
    ELSE 'two'
END

label:functionality[] label:updated[]

RETURN round(val, precision)

Rounding infinity and NaN values will now return the original value instead of returning an integer approximation for precision 0 and throwing an exception for precision > 0:

old value new value

round(Inf)

9223372036854776000.0

Inf

round(Inf, 1)

exception

Inf

round(NaN)

0

NaN

round(Inf, 1)

exception

NaN

To get an integer value use the toInteger function.

label:functionality[] label:updated[]

CREATE [OR REPLACE] ALIAS compositeDatabase.aliasName ...
ALTER ALIAS compositeDatabase.aliasName
DROP ALIAS compositeDatabase.aliasName

The alias commands can now handle aliases in composite databases.

label:functionality[] label:updated[]

SHOW ALIAS[ES] aliasName FOR DATABASE[S]
SHOW ALIAS[ES] compositeDatabase.aliasName FOR DATABASE[S]

SHOW ALIAS now allows for easy filtering on alias name.

label:functionality[] label:updated[]

CREATE [OR REPLACE] ALIAS compositeDatabase.aliasName ...
ALTER ALIAS compositeDatabase.aliasName
DROP ALIAS compositeDatabase.aliasName

The alias commands can now handle aliases in composite databases.

label:functionality[] label:updated[]

SHOW ALIAS[ES] aliasName FOR DATABASE[S]
SHOW ALIAS[ES] compositeDatabase.aliasName FOR DATABASE[S]

SHOW ALIAS now allows for easy filtering on alias name.

New features

Feature Details

label:functionality[] label:new[]

CREATE [OR REPLACE] COMPOSITE DATABASE databaseName [IF NOT EXISTS] [WAIT [n [SEC[OND[S]]]]|NOWAIT]
DROP COMPOSITE DATABASE databaseName [IF EXISTS] [DUMP DATA | DESTROY DATA] [WAIT [n [SEC[OND[S]]]]|NOWAIT]

New Cypher command for creating and dropping composite databases.

label:functionality[] label:new[]
New privilege:

CREATE COMPOSITE DATABASE
DROP COMPOSITE DATABASE
COMPOSITE DATABASE MANAGEMENT

New privileges that allow a user to CREATE and/or DROP composite databases.

label:functionality[] label:new[]

1_000_000, 0x_FF_FF, 0o_88_88

Cypher now supports number literals with underscores between digits.

label:functionality[] label:new[]

isNaN(n.prop)

New function which returns whether the given number is NaN. NaN is a special floating point number defined in the Floating-Point Standard IEEE 754. This function was introduced since comparisons including NaN = NaN returns false.

label:functionality[] label:new[]

NaN, Inf, Infinity

Cypher now supports float literals for the values Infinity and NaN. NaN defines a quiet not-a-number value and does not throw any exceptions in arithmetic operations. Both values are implemented according to the Floating-Point Standard IEEE 754.

label:functionality[] label:new[]

COUNT { (n) WHERE n.foo = "bar" }

New expression which returns the number of results of a subquery.

label:functionality[] label:new[]

CREATE DATABASE ... TOPOLOGY n PRIMAR{Y|IES} [m SECONDAR{Y|IES}]

New sub-clause for CREATE DATABASE, to specify the number of servers hosting a database, when creating a database in cluster environments.

label:functionality[] label:new[]

ALTER DATABASE ... SET TOPOLOGY n PRIMAR{Y|IES} [m SECONDAR{Y|IES}]

New sub-clause for ALTER DATABASE, which allows modifying the number of servers hosting a database in cluster environments.

label:functionality[] label:new[]

ENABLE SERVER ...

New Cypher command for enabling servers.

label:functionality[] label:new[]

ALTER SERVER ... SET OPTIONS ...

New Cypher command for setting options for a server.

label:functionality[] label:new[]

RENAME SERVER ... TO ...

New Cypher command for changing the name of a server.

label:functionality[] label:new[]

REALLOCATE DATABASES

New Cypher command for re-balancing what servers host which databases.

label:functionality[] label:new[]

DEALLOCATE DATABASE[S] FROM SERVER[S] ...

New Cypher command for moving all databases from servers.

label:functionality[] label:new[]

DROP SERVER ...

New Cypher command for dropping servers.

label:functionality[] label:new[]

SHOW SERVERS

New Cypher command for listing servers.

label:functionality[] label:new[]
New privileges:

SERVER MANAGEMENT
SHOW SERVERS

New privileges that allow a user to create, modify, reallocate, deallocate, drop and list servers.

label:functionality[] label:new[]

MATCH (n: A&(B|C)&!D)

New concise syntax for expressing predicates for which labels a node may have, referred to as label expression.

label:functionality[] label:new[]

MATCH ()-[r:(!A&!B)]->()

New concise syntax for expressing predicates for which relationship types a relationship may have, referred to as relationship type expression.

label:functionality[] label:new[]

MATCH ()-[r:R {prop1: 42} WHERE r.prop2 > 42]->()

New syntax that enables inlining of WHERE clauses inside relationship patterns.

Neo4j 4.4

Deprecated features

Feature Details

label:functionality[] label:deprecated[]

MATCH (n) RETURN n.propertyName_1, n.propertyName_2 + count(*)

Implied grouping keys are deprecated. Only expressions that do not contain aggregations are still considered grouping keys. In expressions that contain aggregations, the leaves must be either:

  • An aggregation

  • A literal

  • A parameter

  • A variable, ONLY IF it is either:
    1) A projection expression on its own (e.g. the n in RETURN n AS myNode, n.value + count(*))
    2) A local variable in the expression (e.g the x in RETURN n, n.prop + size([ x IN range(1, 10) | x ])

  • Property access, ONLY IF it is also a projection expression on its own (e.g. the n.prop in RETURN n.prop, n.prop + count(*))

  • Map access, ONLY IF it is also a projection expression on its own (e.g. the map.prop in WITH {prop: 2} AS map RETURN map.prop, map.prop + count(*))

label:syntax[] label:deprecated[]

USING PERIODIC COMMIT ...

Replaced by:

CALL {
  ...
} IN TRANSACTIONS

label:syntax[] label:deprecated[]

CREATE (a {prop:7})-[r:R]->(b {prop: a.prop})

CREATE clauses in which a variable introduced in the pattern is also referenced from the same pattern are deprecated.

label:syntax[] label:deprecated[]

CREATE CONSTRAINT ON ... ASSERT ...

Replaced by:

CREATE CONSTRAINT FOR ... REQUIRE ...

label:functionality[] label:deprecated[]

CREATE BTREE INDEX ...

B-tree indexes are deprecated.

B-tree indexes used for string queries are replaced by:

CREATE TEXT INDEX ...

B-tree indexes used for spatial queries are replaced by:

CREATE POINT INDEX ...

B-tree indexes used for general queries or property value types are replaced by:

CREATE RANGE INDEX ...

These new indexes may be combined for multiple use cases.

label:functionality[] label:deprecated[]

CREATE INDEX
...
OPTIONS "{" btree-option: btree-value[, ...] "}"

label:functionality[] label:deprecated[]

SHOW BTREE INDEXES

B-tree indexes are deprecated.

Replaced by:

SHOW {POINT | RANGE | TEXT} INDEXES

label:functionality[] label:deprecated[]

USING BTREE INDEX

B-tree indexes are deprecated.

Replaced by:

USING {POINT | RANGE | TEXT} INDEX

label:functionality[] label:deprecated[]

CREATE CONSTRAINT
...
OPTIONS "{" btree-option: btree-value[, ...] "}"

Node key and property uniqueness constraints with B-tree options are deprecated.

Replaced by:

CREATE CONSTRAINT
...
OPTIONS "{" range-option: range-value[, ...] "}"

Constraints used for string properties will also require an additional text index to cover the string queries properly. Constraints used for point properties will also require an additional point index to cover the spatial queries properly.

label:functionality[] label:deprecated[]

distance(n.prop, point({x:0, y:0})

Replaced by:

point.distance(n.prop, point({x:0, y:0})

label:functionality[] label:deprecated[]

point({x:0, y:0}) <= point({x:1, y:1}) <= point({x:2, y:2})

The ability to use the inequality operators <, , >, and >= on spatial points is deprecated. Instead, use:

point.withinBBox(point({x:1, y:1}), point({x:0, y:0}), point({x:2, y:2}))

label:functionality[] label:deprecated[]

MATCH (n)
RETURN
CASE n.prop
    WHEN null THEN 'one'
    ELSE 'two'
END

Currently, if n.prop is null, 'one' would be returned. Since null = null returns false in Cypher, a WHEN expression will no longer match in future versions.

Please use IS NULL instead:

MATCH (n)
RETURN
CASE
    WHEN n.prop IS NULL THEN 'one'
    ELSE 'two'
END

New features

Feature Details

label:functionality[] label:new[]

CALL {
  ...
} IN TRANSACTIONS

New clause for evaluating a subquery in separate transactions. Typically used when modifying or importing large amounts of data. See CALL { ... } IN TRANSACTIONS.

label:syntax[] label:new[]

CREATE CONSTRAINT FOR ... REQUIRE ...

New syntax for creating constraints, applicable to all constraint types.

label:functionality[] label:new[]

CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR (n:LabelName)
REQUIRE (n.propertyName_1, …, n.propertyName_n) IS UNIQUE
[OPTIONS "{" option: value[, ...] "}"]

Property uniqueness constraints now allow multiple properties, ensuring that the combination of property values are unique.

label:functionality[] label:new[] label:deprecated[]

DROP CONSTRAINT
ON (n:LabelName)
ASSERT (n.propertyName_1, …, n.propertyName_n) IS UNIQUE

Property uniqueness constraints now allow multiple properties.

Replaced by:

DROP CONSTRAINT name [IF EXISTS]

label:syntax[] label:new[]

CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR ...
REQUIRE ... IS NOT NULL
OPTIONS "{" "}"

Existence constraints now allow an OPTIONS map, however, at this point there are no available values for the map.

label:functionality[] label:new[]

CREATE LOOKUP INDEX [index_name] [IF NOT EXISTS]
FOR ... ON ...
OPTIONS "{" option: value[, ...] "}"

Token lookup indexes now allow an OPTIONS map to specify the index provider.

label:functionality[] label:new[]

CREATE TEXT INDEX ...

Allows creating text indexes on nodes or relationships with a particular label or relationship type, and property combination. They can be dropped by using their name.

label:functionality[] label:new[]

CREATE RANGE INDEX ...

Allows creating range indexes on nodes or relationships with a particular label or relationship type, and properties combination. They can be dropped by using their name.

label:functionality[] label:new[]

CREATE CONSTRAINT
...
OPTIONS "{" indexProvider: 'range-1.0' "}"

Allows creating node key and property uniqueness constraints backed by range indexes by providing the range index provider in the OPTIONS map.

label:functionality[] label:new[]

CREATE POINT INDEX ...

Allows creating point indexes on nodes or relationships with a particular label or relationship type, and property combination. They can be dropped by using their name.

label:syntax[] label:new[]
New privilege:

IMPERSONATE

New privilege that allows a user to assume privileges of another one.

label:functionality[] label:new[]

SHOW TRANSACTION[S] [transaction-id[,...]]
[YIELD { * | field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
[WHERE expression]
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]

List transactions on the current server.

The transaction-id is a comma-separated list of one or more quoted STRING values, a STRING parameter, or a list parameter.

This replaces the procedures dbms.listTransactions and dbms.listQueries.

label:functionality[] label:new[]

TERMINATE TRANSACTION[S] transaction-id[,...]

Terminate transactions on the current server.

The transaction-id is a comma-separated list of one or more quoted STRING values, a STRING parameter, or a list parameter.

This replaces the procedures dbms.killTransaction, dbms.killTransactions, dbms.killQuery, and dbms.killQueries.

label:functionality[] label:new[]

ALTER DATABASE ...  [IF EXISTS]
SET ACCESS {READ ONLY | READ WRITE}

New Cypher command for modifying a database by changing its access mode.

label:functionality[] label:new[]
New privilege:

ALTER DATABASE

New privilege that allows a user to modify databases.

label:functionality[] label:new[]
New privilege:

SET DATABASE ACCESS

New privilege that allows a user to modify database access mode.

label:functionality[] label:new[]

CREATE ALIAS ... [IF NOT EXISTS]
FOR DATABASE ...

New Cypher command for creating an alias for a database name. Remote aliases are only supported from Neo4j 4.4.8.

label:functionality[] label:new[]

CREATE OR REPLACE ALIAS ...
FOR DATABASE ...

New Cypher command for creating or replacing an alias for a database name. Remote aliases are only supported from Neo4j 4.4.8.

label:functionality[] label:new[]

ALTER ALIAS ... [IF EXISTS]
SET DATABASE ...

New Cypher command for altering an alias. Remote aliases are only supported from Neo4j 4.4.8.

label:functionality[] label:new[]

DROP ALIAS ... [IF EXISTS] FOR DATABASE

New Cypher command for dropping a database alias.

label:functionality[] label:new[]

SHOW ALIASES FOR DATABASE

New Cypher command for listing database aliases. Only supported since Neo4j 4.4.8.

label:functionality[] label:new[]
New privilege:

ALIAS MANAGEMENT

New privilege that allows a user to create, modify, delete and list aliases. Only supported since Neo4j 4.4.8.

label:functionality[] label:new[]
New privilege:

CREATE ALIAS

New privilege that allows a user to create aliases. Only supported since Neo4j 4.4.8.

label:functionality[] label:new[]
New privilege:

ALTER ALIAS

New privilege that allows a user to modify aliases. Only supported since Neo4j 4.4.8.

label:functionality[] label:new[]
New privilege:

DROP ALIAS

New privilege that allows a user to delete aliases. Only supported since Neo4j 4.4.8.

label:functionality[] label:new[]
New privilege:

SHOW ALIAS

New privilege that allows a user to show aliases. Only supported since Neo4j 4.4.8.

label:syntax[] label:new[]

MATCH (n:N {prop1: 42} WHERE n.prop2 > 42)

New syntax that enables inlining of WHERE clauses inside node patterns.

Neo4j 4.3

Deprecated features

Feature Details

label:syntax[] label:deprecated[]

CREATE CONSTRAINT [name]
ON (node:Label)
ASSERT exists(node.property)

Replaced by:

CREATE CONSTRAINT [name]
ON (node:Label)
ASSERT node.property IS NOT NULL

label:syntax[] label:deprecated[]

CREATE CONSTRAINT [name]
ON ()-[rel:REL]-()
ASSERT exists(rel.property)

Replaced by:

CREATE CONSTRAINT [name]
ON ()-[rel:REL]-()
ASSERT rel.property IS NOT NULL

label:syntax[] label:deprecated[]

exists(prop)

Replaced by:

prop IS NOT NULL

label:syntax[] label:deprecated[]

NOT exists(prop)

Replaced by:

prop IS NULL

label:syntax[] label:deprecated[]
BRIEF [OUTPUT] for SHOW INDEXES and SHOW CONSTRAINTS.

Replaced by default output columns.

label:syntax[] label:deprecated[]
VERBOSE [OUTPUT] for SHOW INDEXES and SHOW CONSTRAINTS.

Replaced by:

YIELD *

label:syntax[] label:deprecated[]

SHOW EXISTS CONSTRAINTS

Replaced by:

SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS

Still allows BRIEF and VERBOSE but not YIELD or WHERE.

label:syntax[] label:deprecated[]

SHOW NODE EXISTS CONSTRAINTS

Replaced by:

SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS

Still allows BRIEF and VERBOSE but not YIELD or WHERE.

label:syntax[] label:deprecated[]

SHOW RELATIONSHIP EXISTS CONSTRAINTS

Replaced by:

SHOW RELATIONSHIP [PROPERTY] EXIST[ENCE] CONSTRAINTS

Still allows BRIEF and VERBOSE but not YIELD or WHERE.

label:syntax[] label:deprecated[]
For privilege commands:

ON DEFAULT DATABASE

Replaced by:

ON HOME DATABASE

label:syntax[] label:deprecated[]
For privilege commands:

ON DEFAULT GRAPH

Replaced by:

ON HOME GRAPH

label:syntax[] label:deprecated[]

MATCH (a) RETURN (a)--()

Pattern expressions producing lists of paths are deprecated, but they can still be used as existence predicates, for example in WHERE clauses. Instead, use a pattern comprehension:

MATCH (a) RETURN [p=(a)--() | p]

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW INDEXES WHERE ...

Now allows filtering for:

SHOW INDEXES

label:functionality[] label:updated[]

SHOW CONSTRAINTS WHERE ...

Now allows filtering for:

SHOW CONSTRAINTS

label:functionality[] label:updated[]

SHOW INDEXES YIELD ...
[WHERE ...]
[RETURN ...]

Now allows YIELD, WHERE, and RETURN clauses to SHOW INDEXES to change the output.

label:functionality[] label:updated[]

SHOW CONSTRAINTS YIELD ...
[WHERE ...]
[RETURN ...]

Now allows YIELD, WHERE, and RETURN clauses to SHOW CONSTRAINTS to change the output.

label:syntax[] label:updated[]

SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS

New syntax for filtering SHOW CONSTRAINTS on property existence constraints.
Allows YIELD and WHERE but not BRIEF or VERBOSE.

label:syntax[] label:updated[]

SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS

New syntax for filtering SHOW CONSTRAINTS on node property existence constraints.
Allows YIELD and WHERE but not BRIEF or VERBOSE.

label:syntax[] label:updated[]

SHOW REL[ATIONSHIP] [PROPERTY] EXIST[ENCE] CONSTRAINTS

New syntax for filtering SHOW CONSTRAINTS on relationship property existence constraints.
Allows YIELD and WHERE but not BRIEF or VERBOSE.

label:functionality[] label:updated[]

SHOW FULLTEXT INDEXES

Now allows easy filtering for SHOW INDEXES on fulltext indexes.
Allows YIELD and WHERE but not BRIEF or VERBOSE.

label:functionality[] label:updated[]

SHOW LOOKUP INDEXES

Now allows easy filtering for SHOW INDEXES on token lookup indexes.
Allows YIELD and WHERE but not BRIEF or VERBOSE.

New features

Feature Details

label:syntax[] label:new[]

CREATE DATABASE ...
[OPTIONS {...}]

New syntax to pass options to CREATE DATABASE. This can be used to specify a specific cluster node to seed data from.

label:syntax[] label:new[]

CREATE CONSTRAINT [name]
ON (node:Label)
ASSERT node.property IS NOT NULL

New syntax for creating node property existence constraints.

label:syntax[] label:new[]

CREATE CONSTRAINT [name]
ON ()-[rel:REL]-()
ASSERT rel.property IS NOT NULL

New syntax for creating relationship property existence constraints.

label:syntax[] label:new[]

ALTER USER name IF EXISTS ...

Makes altering users idempotent. If the specified name does not exists, no error is thrown.

label:syntax[] label:new[]

ALTER USER ...
SET HOME DATABASE ...

Now allows setting home database for user.

label:syntax[] label:new[]

ALTER USER ...
REMOVE HOME DATABASE

Now allows removing home database for user.

label:syntax[] label:new[]

CREATE USER ...
SET HOME DATABASE ...

CREATE USER now allows setting home database for user.

label:syntax[] label:new[]

SHOW HOME DATABASE

New syntax for showing the home database of the current user.

label:syntax[] label:new[]
New privilege:

SET USER HOME DATABASE

New Cypher command for administering privilege for changing users home database.

label:syntax[] label:new[]
For privilege commands:

ON HOME DATABASE

New syntax for privileges affecting home database.

label:syntax[] label:new[]
For privilege commands:

ON HOME GRAPH

New syntax for privileges affecting home graph.

label:syntax[] label:new[]

CREATE FULLTEXT INDEX ...

Allows creating fulltext indexes on nodes or relationships. They can be dropped by using their name.

label:functionality[] label:new[]

CREATE INDEX FOR ()-[r:TYPE]-() ...

Allows creating indexes on relationships with a particular relationship type and property combination. They can be dropped by using their name.

label:functionality[] label:new[]

CREATE LOOKUP INDEX ...

Create token lookup index for nodes with any labels or relationships with any relationship type. They can be dropped by using their name.

label:functionality[] label:new[]

RENAME ROLE

New Cypher command for changing the name of a role.

label:functionality[] label:new[]

RENAME USER

New Cypher command for changing the name of a user.

label:functionality[] label:new[]

SHOW PROCEDURE[S]
[EXECUTABLE [BY {CURRENT USER | username}]]
[YIELD ...]
[WHERE ...]
[RETURN ...]

New Cypher commands for listing procedures.

label:functionality[] label:new[]

SHOW [ALL | BUILT IN | USER DEFINED] FUNCTION[S]
[EXECUTABLE [BY {CURRENT USER | username}]]
[YIELD ...]
[WHERE ...]
[RETURN ...]

New Cypher commands for listing functions.

Neo4j 4.2

Deprecated features

Feature Details

label:syntax[] label:deprecated[]

0...

Replaced by 0o....

label:syntax[] label:deprecated[]

0X...

Only 0x... (lowercase x) is supported.

label:syntax[] label:deprecated[]

CALL { RETURN 1 }

Unaliased expressions are deprecated in subquery RETURN clauses. Replaced by:

CALL { RETURN 1 AS one }

Updated features

Feature Details

label:functionality[] label:updated[]

SHOW ROLE name PRIVILEGES

Can now handle multiple roles.

SHOW ROLES n1, n2, ... PRIVILEGES

label:functionality[] label:updated[]

SHOW USER name PRIVILEGES

Can now handle multiple users.

SHOW USERS n1, n2, ... PRIVILEGES

label:functionality[] label:updated[]

round(expression, precision)

The round() function can now take an additional argument to specify rounding precision.

label:functionality[] label:updated[]

round(expression, precision, mode)

The round() function can now take two additional arguments to specify rounding precision and rounding mode.

New features

Feature Details

label:functionality[] label:new[]

SHOW PRIVILEGES [AS [REVOKE] COMMAND[S]]

Privileges can now be shown as Cypher commands.

label:syntax[] label:new[]

DEFAULT GRAPH

New optional part of the Cypher commands for database privileges.

label:syntax[] label:new[]

0o...

Cypher now interprets literals with prefix 0o as an octal integer literal.

label:syntax[] label:new[]

SET [PLAINTEXT | ENCRYPTED] PASSWORD

For CREATE USER and ALTER USER, it is now possible to set (or update) a password when the plaintext password is unknown, but the encrypted password is available.

label:functionality[] label:new[]
New privilege:

EXECUTE

New Cypher commands for administering privileges for executing procedures and user defined functions. See The DBMS EXECUTE privileges.

label:syntax[] label:new[]

CREATE [BTREE] INDEX ... [OPTIONS {...}]

Allows setting index provider and index configuration when creating an index.

label:syntax[] label:new[]

CREATE CONSTRAINT ... IS NODE KEY [OPTIONS {...}]

Allows setting index provider and index configuration for the backing index when creating a node key constraint.

label:syntax[] label:new[]

CREATE CONSTRAINT ... IS UNIQUE [OPTIONS {...}]

Allows setting index provider and index configuration for the backing index when creating a property uniqueness constraint.

label:syntax[] label:new[]

SHOW CURRENT USER

New Cypher command for showing current logged-in user and roles.

label:functionality[] label:new[]

SHOW [ALL | BTREE] INDEX[ES] [BRIEF | VERBOSE [OUTPUT]]

New Cypher commands for listing indexes.

Replaces the procedures db.indexes, db.indexDetails (verbose), and partially db.schemaStatements (verbose).

label:functionality[] label:new[]

SHOW [ALL | UNIQUE | NODE EXIST[S] | RELATIONSHIP EXIST[S] | EXIST[S] | NODE KEY] CONSTRAINT[S] [BRIEF | VERBOSE [OUTPUT]]

New Cypher commands for listing constraints.

Replaces the procedures db.constraints and partially db.schemaStatements (verbose).

label:functionality[] label:new[]
New privilege:

SHOW INDEX

New Cypher command for administering privilege for listing indexes.

label:functionality[] label:new[]
New privilege:

SHOW CONSTRAINTS

New Cypher command for administering privilege for listing constraints.

Neo4j 4.1.3

New features

Feature Details

label:syntax[] label:new[]

CREATE INDEX [name] IF NOT EXISTS FOR ...

Makes index creation idempotent. If an index with the name or schema already exists no error will be thrown.

label:syntax[] label:new[]

DROP INDEX name IF EXISTS

Makes index deletion idempotent. If no index with the name exists no error will be thrown.

label:syntax[] label:new[]

CREATE CONSTRAINT [name] IF NOT EXISTS ON ...

Makes constraint creation idempotent. If a constraint with the name or type and schema already exists no error will be thrown.

label:syntax[] label:new[]

DROP CONSTRAINT name IF EXISTS

Makes constraint deletion idempotent. If no constraint with the name exists no error will be thrown.

Neo4j 4.1

Restricted features

Feature Details

label:functionality[] label:restricted[]

REVOKE ...

No longer revokes sub-privileges when revoking a compound privilege, e.g. when revoking INDEX MANAGEMENT, any CREATE INDEX and DROP INDEX privileges will no longer be revoked.

label:functionality[] label:restricted[]

ALL DATABASE PRIVILEGES

No longer includes the privileges START DATABASE and STOP DATABASE.

Updated features

Feature Details

label:procedure[] label:updated[]

queryId

The queryId procedure format has changed, and no longer includes the database name. For example, mydb-query-123 is now query-123. This change affects built-in procedures dbms.listQueries(), dbms.listActiveLocks(queryId), dbms.killQueries(queryIds) and dbms.killQuery(queryId).

label:functionality[] label:updated[]

SHOW PRIVILEGES

The returned privileges are a closer match to the original grants and denies, e.g. if granted MATCH the command will show that specific privilege and not the TRAVERSE and READ privileges. Added support for YIELD and WHERE clauses to allow filtering results.

New features

Feature Details

label:functionality[] label:new[]
New role:

PUBLIC

The PUBLIC role is automatically assigned to all users, giving them a set of base privileges.

label:syntax[] label:new[]
For privileges:

REVOKE MATCH

The MATCH privilege can now be revoked.

label:functionality[] label:new[]

SHOW USERS

New support for YIELD and WHERE clauses to allow filtering results.

label:functionality[] label:new[]

SHOW ROLES

New support for YIELD and WHERE clauses to allow filtering results.

label:functionality[] label:new[]

SHOW DATABASES

New support for YIELD and WHERE clauses to allow filtering results.

label:functionality[] label:new[]
TRANSACTION MANAGEMENT privileges

New Cypher commands for administering transaction management.

label:functionality[] label:new[]
DBMS USER MANAGEMENT privileges

New Cypher commands for administering user management.

label:functionality[] label:new[]
DBMS DATABASE MANAGEMENT privileges

New Cypher commands for administering database management.

label:functionality[] label:new[]
DBMS PRIVILEGE MANAGEMENT privileges

New Cypher commands for administering privilege management.

label:functionality[] label:new[]

ALL DBMS PRIVILEGES

New Cypher command for administering role, user, database and privilege management.

label:functionality[] label:new[]

ALL GRAPH PRIVILEGES

New Cypher command for administering read and write privileges.

label:functionality[] label:new[]
Write privileges

New Cypher commands for administering write privileges.

label:functionality[] label:new[]

ON DEFAULT DATABASE

New optional part of the Cypher commands for database privileges.

Neo4j 4.0

Removed features

Feature Details

label:function[] label:removed[]

rels()

Replaced by relationships().

label:function[] label:removed[]

toInt()

Replaced by toInteger().

label:function[] label:removed[]

lower()

Replaced by toLower().

label:function[] label:removed[]

upper()

Replaced by toUpper().

label:function[] label:removed[]

extract()

Replaced by list comprehension.

label:function[] label:removed[]

filter()

Replaced by list comprehension.

label:functionality[] label:removed[]
For Rule planner:

CYPHER planner=rule

The RULE planner was removed in 3.2, but still possible to trigger using START or CREATE UNIQUE clauses. Now it is completely removed.

label:functionality[] label:removed[]
Explicit indexes

The removal of the RULE planner in 3.2 was the beginning of the end for explicit indexes. Now they are completely removed, including the removal of the built-in procedures for Neo4j 3.3 to 3.5.

label:functionality[] label:removed[]
For compiled runtime:

CYPHER runtime=compiled

Replaced by the new pipelined runtime which covers a much wider range of queries.

label:clause[] label:removed[]

CREATE UNIQUE

Running queries with this clause will cause a syntax error.

label:clause[] label:removed[]

START

Running queries with this clause will cause a syntax error.

label:syntax[] label:removed[]

MATCH (n)-[:A|:B|:C {foo: 'bar'}]-() RETURN n

Replaced by MATCH (n)-[:A|B|C {foo: 'bar'}]-() RETURN n.

label:syntax[] label:removed[]

MATCH (n)-[x:A|:B|:C]-() RETURN n

Replaced by MATCH (n)-[x:A|B|C]-() RETURN n.

label:syntax[] label:removed[]

MATCH (n)-[x:A|:B|:C*]-() RETURN n

Replaced by MATCH (n)-[x:A|B|C*]-() RETURN n.

label:syntax[] label:removed[]

{parameter}

Replaced by $parameter.

Deprecated features

Feature Details

label:syntax[] label:deprecated[]

MATCH (n)-[rs*]-() RETURN rs

As in Cypher 3.2, this is replaced by:

MATCH p=(n)-[*]-() RETURN relationships(p) AS rs

label:syntax[] label:deprecated[]

CREATE INDEX ON :Label(prop)

Replaced by CREATE INDEX FOR (n:Label) ON (n.prop).

label:syntax[] label:deprecated[]

DROP INDEX ON :Label(prop)

Replaced by DROP INDEX name.

label:syntax[] label:deprecated[]

DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS NODE KEY

Replaced by DROP CONSTRAINT name.

label:syntax[] label:deprecated[]

DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS UNIQUE

Replaced by DROP CONSTRAINT name.

label:syntax[] label:deprecated[]

DROP CONSTRAINT ON (n:Label) ASSERT exists(n.prop)

Replaced by DROP CONSTRAINT name.

label:syntax[] label:deprecated[]

DROP CONSTRAINT ON ()-[r:Type]-() ASSERT exists(r.prop)

Replaced by DROP CONSTRAINT name.

Restricted features

Feature Details

label:function[] label:restricted[]

length()

Restricted to only work on paths. See length() for more details.

label:function[] label:restricted[]

size()

Only works for strings, lists and pattern comprehensions, and no longer works for paths. For versions above 5.0, use a COUNT expression instead:

RETURN COUNT { (a)-[]->(b) }

For versions below 5.0, use a pattern comprehension instead:

RETURN size([ (a)-[]->(b) | a ])

See size() and Count Subqueries for more details.

Updated features

Feature Details

label:syntax[] label:extended[]

CREATE CONSTRAINT [name] ON ...

The create constraint syntax can now include a name.

The IS NODE KEY and IS UNIQUE versions of this command replace the procedures db.createNodeKey and db.createUniquePropertyConstraint, respectively.

New features

Feature Details

label:functionality[] label:new[]
Pipelined runtime:

CYPHER runtime=pipelined

This Neo4j Enterprise Edition only feature involves a new runtime that has many performance enhancements.

label:functionality[] label:new[]
Multi-database administration

New Cypher commands for administering multiple databases.

label:functionality[] label:new[]
Access control

New Cypher commands for administering role-based access control.

label:functionality[] label:new[]
Fine-grained security

New Cypher commands for administering dbms, database, graph and sub-graph access control.

label:syntax[] label:new[]

CREATE INDEX [name] FOR (n:Label) ON (n.prop)

New syntax for creating indexes, which can include a name.

Replaces the db.createIndex procedure.

label:syntax[] label:new[]

DROP INDEX name

New command for dropping an index by name.

label:syntax[] label:new[]

DROP CONSTRAINT name

New command for dropping a constraint by name, no matter the type.

label:clause[] label:new[]

WHERE EXISTS {...}

EXISTS subqueries are subclauses used to filter the results of a MATCH, OPTIONAL MATCH, or WITH clause.

label:clause[] label:new[]

USE neo4j

New clause to specify which graph a query, or query part, is executed against.

Neo4j 3.5

Deprecated features

Feature Details

label:functionality[] label:deprecated[]
Compiled runtime:

CYPHER runtime=compiled

The compiled runtime will be discontinued in the next major release. It might still be used for default queries in order to not cause regressions, but explicitly requesting it will not be possible.

label:function[] label:deprecated[]

extract()

Replaced by list comprehension.

label:function[] label:deprecated[]

filter()

Replaced by list comprehension.

Neo4j 3.4

Feature Type Change Details

Spatial point types

Functionality

Amendment

A point — irrespective of which Coordinate Reference System is used — can be stored as a property and is able to be backed by an index. Prior to this, a point was a virtual property only.

point() - Cartesian 3D

Function

Added

point() - WGS 84 3D

Function

Added

randomUUID()

Function

Added

Temporal types

Functionality

Added

Supports storing, indexing and working with the following temporal types: Date, Time, LocalTime, DateTime, LocalDateTime and Duration.

Temporal functions

Functionality

Added

Functions allowing for the creation and manipulation of values for each temporal type — Date, Time, LocalTime, DateTime, LocalDateTime and Duration.

Temporal operators

Functionality

Added

Operators allowing for the manipulation of values for each temporal type — Date, Time, LocalTime, DateTime, LocalDateTime and Duration.

toString()

Function

Extended

Now also allows temporal values as input (i.e. values of type Date, Time, LocalTime, DateTime, LocalDateTime or Duration).

Neo4j 3.3

Feature Type Change Details

START

Clause

Removed

As in Cypher 3.2, any queries using the START clause will revert back to Cypher 3.1 planner=rule. However, there are built-in procedures for Neo4j versions 3.3 to 3.5 for accessing explicit indexes. The procedures will enable users to use the current version of Cypher and the cost planner together with these indexes. An example of this is CALL db.index.explicit.searchNodes('my_index','email:me*').

CYPHER runtime=slotted (Faster interpreted runtime)

Functionality

Added

Neo4j Enterprise Edition only

max(), min()

Function

Extended

Now also supports aggregation over sets containing lists of strings and/or numbers, as well as over sets containing strings, numbers, and lists of strings and/or numbers

Neo4j 3.2

Feature Type Change Details

CYPHER planner=rule (Rule planner)

Functionality

Removed

All queries now use the cost planner. Any query prepended thus will fall back to using Cypher 3.1.

CREATE UNIQUE

Clause

Removed

Running such queries will fall back to using Cypher 3.1 (and use the rule planner)

START

Clause

Removed

Running such queries will fall back to using Cypher 3.1 (and use the rule planner)

MATCH (n)-[rs*]-() RETURN rs

Syntax

Deprecated

Replaced by MATCH p=(n)-[*]-() RETURN relationships(p) AS rs

MATCH (n)-[:A|:B|:C {foo: 'bar'}]-() RETURN n

Syntax

Deprecated

Replaced by MATCH (n)-[:A|B|C {foo: 'bar'}]-() RETURN n

MATCH (n)-[x:A|:B|:C]-() RETURN n

Syntax

Deprecated

Replaced by MATCH (n)-[x:A|B|C]-() RETURN n

MATCH (n)-[x:A|:B|:C*]-() RETURN n

Syntax

Deprecated

Replaced by MATCH (n)-[x:A|B|C*]-() RETURN n

User-defined aggregation functions

Functionality

Added

Composite indexes

Index

Added

Node Key

Index

Added

Neo4j Enterprise Edition only

CYPHER runtime=compiled (Compiled runtime)

Functionality

Added

Neo4j Enterprise Edition only

reverse()

Function

Extended

Now also allows a list as input

max(), min()

Function

Extended

Now also supports aggregation over a set containing both strings and numbers

Neo4j 3.1

Feature Type Change Details

rels()

Function

Deprecated

Replaced by relationships()

toInt()

Function

Deprecated

Replaced by toInteger()

lower()

Function

Deprecated

Replaced by toLower()

upper()

Function

Deprecated

Replaced by toUpper()

toBoolean()

Function

Added

Map projection

Syntax

Added

Pattern comprehension

Syntax

Added

User-defined functions

Functionality

Added

CALL...YIELD...WHERE

Clause

Extended

Records returned by YIELD may be filtered further using WHERE

Neo4j 3.0

Feature Type Change Details

has()

Function

Removed

Replaced by exists()

str()

Function

Removed

Replaced by toString()

{parameter}

Syntax

Deprecated

Replaced by $parameter

properties()

Function

Added

CALL [...YIELD]

Clause

Added

point() - Cartesian 2D

Function

Added

point() - WGS 84 2D

Function

Added

distance()

Function

Added

User-defined procedures

Functionality

Added

toString()

Function

Extended

Now also allows Boolean values as input