diff --git a/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc b/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc index cce7ca5191e..e3c5e023ae1 100644 --- a/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc +++ b/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc @@ -12,36 +12,64 @@ Replacement syntax for deprecated and removed features are also indicated. [[cypher-deprecations-additions-removals-4.3]] == Version 4.3 + +=== Deprecated features + [cols="2", options="header"] |=== | Feature | Details - a| label:syntax[] -label:added[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT [name] +ON (node:Label) +ASSERT exists(node.property) +---- +a| Replaced by: [source, cypher, role="noheader"] ---- CREATE CONSTRAINT [name] ON (node:Label) ASSERT node.property IS NOT NULL ---- -a| -New syntax for creating node property existence constraints. a| label:syntax[] -label:added[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT [name] +ON ()-[rel:REL]-() +ASSERT exists(rel.property) +---- +a| +Replaced by: [source, cypher, role="noheader"] ---- CREATE CONSTRAINT [name] ON ()-[rel:REL]-() ASSERT rel.property IS NOT NULL ---- + + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +exists(prop) +---- a| -New syntax for creating relationship property existence constraints. +Replaced by: +[source, cypher, role="noheader"] +---- +prop IS NOT NULL +---- a| @@ -49,36 +77,48 @@ label:syntax[] label:deprecated[] [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT [name] -ON (node:Label) -ASSERT exists(node.property) +NOT exists(prop) ---- -a| Replaced by: +a| +Replaced by: [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT [name] -ON (node:Label) -ASSERT node.property IS NOT NULL +prop IS NULL ---- +a| +label:syntax[] +label:deprecated[] + +`BRIEF [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS`. +a| +Replaced by default output columns. + + +a| +label:syntax[] +label:deprecated[] + +`VERBOSE [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS`. +a| +Replaced by: +[source, cypher, role="noheader"] +---- +YIELD * +---- a| label:syntax[] label:deprecated[] [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT [name] -ON ()-[rel:REL]-() -ASSERT exists(rel.property) +SHOW EXISTS CONSTRAINTS ---- a| Replaced by: [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT [name] -ON ()-[rel:REL]-() -ASSERT rel.property IS NOT NULL +SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS ---- +Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. a| @@ -86,14 +126,15 @@ label:syntax[] label:deprecated[] [source, cypher, role="noheader"] ---- -exists(prop) +SHOW NODE EXISTS CONSTRAINTS ---- a| Replaced by: [source, cypher, role="noheader"] ---- -prop IS NOT NULL +SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS ---- +Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. a| @@ -101,27 +142,54 @@ label:syntax[] label:deprecated[] [source, cypher, role="noheader"] ---- -NOT exists(prop) +SHOW RELATIONSHIP EXISTS CONSTRAINTS ---- a| Replaced by: [source, cypher, role="noheader"] ---- -prop IS NULL +SHOW RELATIONSHIP [PROPERTY] EXIST[ENCE] CONSTRAINTS +---- +Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. + +a| +label:syntax[] +label:deprecated[] + +For privilege commands: +[source, cypher, role="noheader"] +---- +ON DEFAULT DATABASE +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +ON HOME DATABASE ---- a| label:syntax[] -label:added[] +label:deprecated[] + +For privilege commands: [source, cypher, role="noheader"] ---- -ALTER USER name IF EXISTS ... +ON DEFAULT GRAPH ---- a| -Makes altering users idempotent. -If the specified name does not exists, no error is thrown. +Replaced by: +[source, cypher, role="noheader"] +---- +ON HOME GRAPH +---- +|=== +=== Updated features + +[cols="2", options="header"] +|=== +| Feature +| Details a| label:functionality[] @@ -179,26 +247,6 @@ a| Now allows `YIELD`, `WHERE`, and `RETURN` clauses to `SHOW CONSTRAINTS` to change the output. -a| -label:syntax[] -label:deprecated[] + -`BRIEF [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS`. -a| -Replaced by default output columns. - - -a| -label:syntax[] -label:deprecated[] + -`VERBOSE [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS`. -a| -Replaced by: -[source, cypher, role="noheader"] ----- -YIELD * ----- - - a| label:syntax[] label:updated[] @@ -236,56 +284,90 @@ Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. a| -label:syntax[] -label:deprecated[] +label:functionality[] +label:updated[] [source, cypher, role="noheader"] ---- -SHOW EXISTS CONSTRAINTS +SHOW FULLTEXT INDEXES ---- a| -Replaced by: +Now allows easy filtering for `SHOW INDEXES` on fulltext indexes. + +Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. + + +a| +label:functionality[] +label:updated[] [source, cypher, role="noheader"] ---- -SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS +SHOW LOOKUP INDEXES ---- -Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. +a| +Now allows easy filtering for `SHOW INDEXES` on token lookup indexes. + +Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. +|=== +=== New features + +[cols="2", options="header"] +|=== +| Feature +| Details a| label:syntax[] -label:deprecated[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW NODE EXISTS CONSTRAINTS +CREATE DATABASE ... +[OPTIONS {...}] ---- a| -Replaced by: +New syntax to pass options to `CREATE DATABASE`. +This can be used to specify a specific cluster node to seed data from. + + +a| +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS +CREATE CONSTRAINT [name] +ON (node:Label) +ASSERT node.property IS NOT NULL ---- -Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. +a| +New syntax for creating node property existence constraints. a| label:syntax[] -label:deprecated[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW RELATIONSHIP EXISTS CONSTRAINTS +CREATE CONSTRAINT [name] +ON ()-[rel:REL]-() +ASSERT rel.property IS NOT NULL ---- a| -Replaced by: +New syntax for creating relationship property existence constraints. + + +a| +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW RELATIONSHIP [PROPERTY] EXIST[ENCE] CONSTRAINTS +ALTER USER name IF EXISTS ... ---- -Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. +a| +Makes altering users idempotent. +If the specified name does not exists, no error is thrown. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- ALTER USER ... @@ -297,7 +379,7 @@ Now allows setting home database for user. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- ALTER USER ... @@ -309,7 +391,7 @@ Now allows removing home database for user. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE USER ... @@ -321,7 +403,7 @@ a| a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- SHOW HOME DATABASE @@ -332,7 +414,7 @@ New syntax for showing the home database of the current user. a| label:syntax[] -label:added[] + +label:new[] + New privilege: [source, cypher, role="noheader"] ---- @@ -344,7 +426,7 @@ New Cypher command for administering privilege for changing users home database. a| label:syntax[] -label:added[] + +label:new[] + For privilege commands: [source, cypher, role="noheader"] ---- @@ -356,7 +438,7 @@ New syntax for privileges affecting home database. a| label:syntax[] -label:added[] + +label:new[] + For privilege commands: [source, cypher, role="noheader"] ---- @@ -365,42 +447,20 @@ ON HOME GRAPH a| New syntax for privileges affecting home graph. - -a| -label:syntax[] -label:deprecated[] + -For privilege commands: -[source, cypher, role="noheader"] ----- -ON DEFAULT DATABASE ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -ON HOME DATABASE ----- - - a| label:syntax[] -label:deprecated[] + -For privilege commands: +label:new[] [source, cypher, role="noheader"] ---- -ON DEFAULT GRAPH +CREATE FULLTEXT INDEX ... ---- a| -Replaced by: -[source, cypher, role="noheader"] ----- -ON HOME GRAPH ----- - +Allows creating fulltext indexes on nodes or relationships. +They can be dropped by using their name. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE INDEX FOR ()-[r:TYPE]-() ... @@ -412,7 +472,7 @@ They can be dropped by using their name. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE LOOKUP INDEX ... @@ -421,111 +481,646 @@ a| Create token lookup index for nodes with any labels or relationships with any relationship type. They can be dropped by using their name. - a| label:functionality[] -label:updated[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW FULLTEXT INDEXES +RENAME ROLE ---- a| -Now allows easy filtering for `SHOW INDEXES` on fulltext indexes. + -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. +New Cypher command for changing the name of a role. a| label:functionality[] -label:updated[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW LOOKUP INDEXES +RENAME USER ---- a| -Now allows easy filtering for `SHOW INDEXES` on token lookup indexes. + -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. +New Cypher command for changing the name of a user. a| -label:syntax[] -label:added[] +label:functionality[] +label:new[] [source, cypher, role="noheader"] ---- -CREATE DATABASE ... -[OPTIONS {...}] +SHOW PROCEDURE[S] +[EXECUTABLE [BY {CURRENT USER \| username}]] +[YIELD ...] +[WHERE ...] +[RETURN ...] ---- a| -New syntax to pass options to `CREATE DATABASE`. -This can be used to specify a specific cluster node to seed data from. +New Cypher commands for listing procedures. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- -RENAME ROLE ----- -a| -New Cypher command for changing the name of a role. +SHOW [ALL \| BUILT IN \| USER DEFINED] FUNCTION[S] +[EXECUTABLE [BY {CURRENT USER \| username}]] +[YIELD ...] +[WHERE ...] +[RETURN ...] +---- +a| +New Cypher commands for listing functions. + +|=== + +[[cypher-deprecations-additions-removals-4.2]] +== Version 4.2 + +=== Deprecated features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +0... +---- +a| +Replaced by `+0o...+`. + + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +0X... +---- +a| +Only `+0x...+` (lowercase x) is supported. + +a| +label:procedure[] +label:deprecated[] +[source, role="noheader"] +---- +db.createIndex +---- +a| +Replaced by `CREATE INDEX` command. +a| +label:procedure[] +label:deprecated[] +[source, role="noheader"] +---- +db.createNodeKey +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT ... IS NODE KEY +---- + + +a| +label:procedure[] +label:deprecated[] +[source, role="noheader"] +---- +db.createUniquePropertyConstraint +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT ... IS UNIQUE +---- + +a| +label:procedure[] +label:deprecated[] +[source, role="noheader"] +---- +db.indexes +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +SHOW INDEXES +---- + + +a| +label:procedure[] +label:deprecated[] +[source, role="noheader"] +---- +db.indexDetails +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +SHOW INDEXES YIELD * +---- + + +a| +label:procedure[] +label:deprecated[] +[source, role="noheader"] +---- +db.constraints +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +SHOW CONSTRAINTS +---- + + +a| +label:procedure[] +label:deprecated[] +[source, role="noheader"] +---- +db.schemaStatements +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +SHOW INDEXES YIELD * +---- +[source, cypher, role="noheader"] +---- +SHOW CONSTRAINTS YIELD * +---- +|=== + +=== Updated features + +[cols="2", options="header"] +|=== +| Feature +| Details + a| label:functionality[] -label:added[] +label:updated[] [source, cypher, role="noheader"] ---- -RENAME USER +SHOW ROLE name PRIVILEGES ---- a| -New Cypher command for changing the name of a user. +Can now handle multiple roles. +[source, cypher, role="noheader"] +---- +SHOW ROLES n1, n2, ... PRIVILEGES +---- a| label:functionality[] -label:added[] +label:updated[] [source, cypher, role="noheader"] ---- -SHOW PROCEDURE[S] -[EXECUTABLE [BY {CURRENT USER \| username}]] -[YIELD ...] -[WHERE ...] -[RETURN ...] +SHOW USER name PRIVILEGES +---- +a| +Can now handle multiple users. +[source, cypher, role="noheader"] +---- +SHOW USERS n1, n2, ... PRIVILEGES +---- + + +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +round(expression, precision) +---- +a| +The `round()` function can now take an additional argument to specify rounding precision. + + +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +round(expression, precision, mode) +---- +a| +The `round()` function can now take two additional arguments to specify rounding precision and rounding mode. +|=== + +=== New features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +SHOW PRIVILEGES [AS [REVOKE] COMMAND[S]] +---- +a| +Privileges can now be shown as Cypher commands. + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +DEFAULT GRAPH +---- +a| +New optional part of the Cypher commands for <>. + + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +0o... +---- +a| +Cypher now interprets literals with prefix `0o` as an octal integer literal. + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +SET [PLAINTEXT \| ENCRYPTED] PASSWORD +---- +a| +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. + + +a| +label:functionality[] +label:new[] + +New privilege: +[source, cypher, role="noheader"] +---- +EXECUTE +---- +a| +New Cypher commands for administering privileges for executing procedures and user defined functions. +See <>. + + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE [BTREE] INDEX ... [OPTIONS {...}] +---- +a| +Allows setting index provider and index configuration when creating an index. + + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT ... IS NODE KEY [OPTIONS {...}] +---- +a| +Allows setting index provider and index configuration for the backing index when creating a node key constraint. + + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT ... IS UNIQUE [OPTIONS {...}] +---- +a| +Allows setting index provider and index configuration for the backing index when creating a uniqueness constraint. + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +SHOW CURRENT USER +---- +a| +New Cypher command for showing current logged-in user and roles. + + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +SHOW [ALL \| BTREE] INDEX[ES] [BRIEF \| VERBOSE [OUTPUT]] +---- +a| +New Cypher commands for listing indexes. + + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +SHOW [ALL \| UNIQUE \| NODE EXIST[S] \| RELATIONSHIP EXIST[S] \| EXIST[S] \| NODE KEY] CONSTRAINT[S] [BRIEF \| VERBOSE [OUTPUT]] +---- +a| +New Cypher commands for listing constraints. + +a| +label:functionality[] +label:new[] + +New privilege: +[source, cypher, role="noheader"] +---- +SHOW INDEX +---- +a| +New Cypher command for administering privilege for listing indexes. + + +a| +label:functionality[] +label:new[] + +New privilege: +[source, cypher, role="noheader"] +---- +SHOW CONSTRAINT +---- +a| +New Cypher command for administering privilege for listing constraints. +|=== + +[[cypher-deprecations-additions-removals-4.1.3]] +== Version 4.1.3 + + +=== New features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE INDEX [name] IF NOT EXISTS FOR ... +---- +a| +Makes index creation idempotent. If an index with the name or schema already exists no error will be thrown. + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +DROP INDEX name IF EXISTS +---- +a| +Makes index deletion idempotent. If no index with the name exists no error will be thrown. + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT [name] IF NOT EXISTS ON ... +---- +a| +Makes constraint creation idempotent. If a constraint with the name or type and schema already exists no error will be thrown. + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +DROP CONSTRAINT name IF EXISTS +---- +a| +Makes constraint deletion idempotent. If no constraint with the name exists no error will be thrown. + +|=== + +[[cypher-deprecations-additions-removals-4.1]] +== Version 4.1 + +=== Restricted features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:restricted[] +[source, cypher, role="noheader"] +---- +REVOKE ... +---- +a| +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. + +a| +label:functionality[] +label:restricted[] +[source, cypher, role="noheader"] +---- +ALL DATABASE PRIVILEGES +---- +a| +No longer includes the privileges `START DATABASE` and `STOP DATABASE`. +|=== + +=== Updated features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:procedure[] +label:updated[] +[source, cypher, role="noheader"] +---- +queryId +---- +a| +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)`. + +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +SHOW PRIVILEGES +---- +a| +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 + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:new[] + +New role: +[source, cypher, role="noheader"] +---- +PUBLIC +---- +a| +The `PUBLIC` role is automatically assigned to all users, giving them a set of base privileges. + +a| +label:syntax[] +label:new[] + +For privileges: +[source, cypher, role="noheader"] +---- +REVOKE MATCH +---- +a| +The `MATCH` privilege can now be revoked. + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +SHOW USERS +---- +a| +New support for `YIELD` and `WHERE` clauses to allow filtering results. + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +SHOW ROLES +---- +a| +New support for `YIELD` and `WHERE` clauses to allow filtering results. + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +SHOW DATABASES +---- +a| +New support for `YIELD` and `WHERE` clauses to allow filtering results. + +a| +label:functionality[] +label:new[] + +<> privileges +a| +New Cypher commands for administering transaction management. + +a| +label:functionality[] +label:new[] + +DBMS <> privileges +a| +New Cypher commands for administering user management. + +a| +label:functionality[] +label:new[] + +DBMS <> privileges +a| +New Cypher commands for administering database management. + + +a| +label:functionality[] +label:new[] + +DBMS <> privileges +a| +New Cypher commands for administering privilege management. + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +ALL DBMS PRIVILEGES ---- a| -New Cypher commands for listing procedures. +New Cypher command for administering role, user, database and privilege management. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW [ALL \| BUILT IN \| USER DEFINED] FUNCTION[S] -[EXECUTABLE [BY {CURRENT USER \| username}]] -[YIELD ...] -[WHERE ...] -[RETURN ...] +ALL GRAPH PRIVILEGES ---- a| -New Cypher commands for listing functions. +New Cypher command for administering read and write privileges. +a| +label:functionality[] +label:new[] + +Write privileges +a| +New Cypher commands for administering write privileges. a| -label:syntax[] -label:added[] +label:functionality[] +label:new[] [source, cypher, role="noheader"] ---- -CREATE FULLTEXT INDEX ... +ON DEFAULT DATABASE ---- a| -Allows creating fulltext indexes on nodes or relationships. -They can be dropped by using their name. +New optional part of the Cypher commands for <>. |=== +[[cypher-deprecations-additions-removals-4.0]] +== Version 4.0 -[[cypher-deprecations-additions-removals-4.2]] -== Version 4.2 +=== Removed features [cols="2", options="header"] |=== @@ -533,417 +1128,423 @@ They can be dropped by using their name. | Details a| -label:functionality[] -label:added[] +label:function[] +label:removed[] [source, cypher, role="noheader"] ---- -SHOW PRIVILEGES [AS [REVOKE] COMMAND[S]] +rels() ---- a| -Privileges can now be shown as Cypher commands. - +Replaced by <>. a| -label:functionality[] -label:updated[] +label:function[] +label:removed[] [source, cypher, role="noheader"] ---- -SHOW ROLE name PRIVILEGES +toInt() ---- a| -Can now handle multiple roles. +Replaced by <>. + +a| +label:function[] +label:removed[] [source, cypher, role="noheader"] ---- -SHOW ROLES n1, n2, ... PRIVILEGES +lower() ---- - +a| +Replaced by <>. a| -label:functionality[] -label:updated[] +label:function[] +label:removed[] [source, cypher, role="noheader"] ---- -SHOW USER name PRIVILEGES +upper() ---- a| -Can now handle multiple users. +Replaced by <>. + +a| +label:function[] +label:removed[] [source, cypher, role="noheader"] ---- -SHOW USERS n1, n2, ... PRIVILEGES +extract() ---- +a| +Replaced by <>. +a| +label:function[] +label:removed[] +[source, cypher, role="noheader"] +---- +filter() +---- +a| +Replaced by <>. a| label:functionality[] -label:updated[] +label:removed[] + +For Rule planner: [source, cypher, role="noheader"] ---- -round(expression, precision) +CYPHER planner=rule ---- a| -The `round()` function can now take an additional argument to specify rounding precision. +The `RULE` planner was removed in 3.2, but still possible to trigger using `START` or `CREATE UNIQUE` clauses. Now it is completely removed. a| label:functionality[] -label:updated[] +label:removed[] + +Explicit indexes +a| +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 link:https://neo4j.com/docs/cypher-manual/3.5/schema/index/#explicit-indexes-procedures[built-in procedures for Neo4j 3.3 to 3.5]. + + +a| +label:functionality[] +label:removed[] + +For compiled runtime: [source, cypher, role="noheader"] ---- -round(expression, precision, mode) +CYPHER runtime=compiled ---- a| -The `round()` function can now take two additional arguments to specify rounding precision and rounding mode. +Replaced by the new `pipelined` runtime which covers a much wider range of queries. a| -label:syntax[] -label:added[] +label:clause[] +label:removed[] [source, cypher, role="noheader"] ---- -DEFAULT GRAPH +CREATE UNIQUE ---- a| -New optional part of the Cypher commands for <>. +Running queries with this clause will cause a syntax error. Running with `CYPHER 3.5` will cause a runtime error due to the removal of the rule planner. +a| +label:clause[] +label:removed[] +[source, cypher, role="noheader"] +---- +START +---- +a| +Running queries with this clause will cause a syntax error. Running with `CYPHER 3.5` will cause a runtime error due to the removal of the rule planner. a| label:syntax[] -label:added[] +label:removed[] [source, cypher, role="noheader"] ---- -0o... +MATCH (n)-[:A\|:B\|:C {foo: 'bar'}]-() RETURN n ---- a| -Cypher now interprets literals with prefix `0o` as an octal integer literal. - +Replaced by `MATCH (n)-[:A\|B\|C {foo: 'bar'}]-() RETURN n`. a| label:syntax[] -label:deprecated[] +label:removed[] [source, cypher, role="noheader"] ---- -0... +MATCH (n)-[x:A\|:B\|:C]-() RETURN n ---- a| -Replaced by `+0o...+` (see above). +Replaced by `MATCH (n)-[x:A\|B\|C]-() RETURN n`. a| label:syntax[] -label:deprecated[] +label:removed[] [source, cypher, role="noheader"] ---- -0X... +MATCH (n)-[x:A\|:B\|:C*]-() RETURN n ---- a| -Only `+0x...+` (lowercase x) is supported. +Replaced by `MATCH (n)-[x:A\|B\|C*]-() RETURN n`. a| label:syntax[] -label:added[] +label:removed[] [source, cypher, role="noheader"] ---- -SET [PLAINTEXT \| ENCRYPTED] PASSWORD +{parameter} ---- a| -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. +Replaced by <>. +|=== + +=== Deprecated features +[cols="2", options="header"] +|=== +| Feature +| Details a| -label:functionality[] -label:added[] + -New privilege: +label:syntax[] +label:deprecated[] [source, cypher, role="noheader"] ---- -EXECUTE +MATCH (n)-[rs*]-() RETURN rs ---- a| -New Cypher commands for administering privileges for executing procedures and user defined functions. -See <>. - +As in Cypher 3.2, this is replaced by: +[source, cypher, role="noheader"] +---- +MATCH p=(n)-[*]-() RETURN relationships(p) AS rs +---- a| label:syntax[] -label:added[] +label:deprecated[] [source, cypher, role="noheader"] ---- -CREATE [BTREE] INDEX ... [OPTIONS {...}] +CREATE INDEX ON :Label(prop) ---- a| -Allows setting index provider and index configuration when creating an index. - +Replaced by `CREATE INDEX FOR (n:Label) ON (n.prop)`. a| label:syntax[] -label:added[] +label:deprecated[] [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT ... IS NODE KEY [OPTIONS {...}] +DROP INDEX ON :Label(prop) ---- a| -Allows setting index provider and index configuration for the backing index when creating a node key constraint. - +Replaced by `DROP INDEX name`. a| label:syntax[] -label:added[] +label:deprecated[] [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT ... IS UNIQUE [OPTIONS {...}] +DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS NODE KEY ---- a| -Allows setting index provider and index configuration for the backing index when creating a uniqueness constraint. - +Replaced by `DROP CONSTRAINT name`. a| -label:procedure[] +label:syntax[] label:deprecated[] [source, cypher, role="noheader"] ---- -db.createIndex +DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS UNIQUE ---- a| -Replaced by `CREATE INDEX` command. - +Replaced by `DROP CONSTRAINT name`. a| -label:procedure[] +label:syntax[] label:deprecated[] [source, cypher, role="noheader"] ---- -db.createNodeKey +DROP CONSTRAINT ON (n:Label) ASSERT exists(n.prop) ---- a| -Replaced by: +Replaced by `DROP CONSTRAINT name`. + +a| +label:syntax[] +label:deprecated[] [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT ... IS NODE KEY +DROP CONSTRAINT ON ()-[r:Type]-() ASSERT exists(r.prop) ---- +a| +Replaced by `DROP CONSTRAINT name`. +|=== + +=== Restricted features + +[cols="2", options="header"] +|=== +| Feature +| Details a| -label:procedure[] -label:deprecated[] +label:function[] +label:restricted[] [source, cypher, role="noheader"] ---- -db.createUniquePropertyConstraint +length() ---- a| -Replaced by: +Restricted to only work on paths. See <> for more details. + +a| +label:function[] +label:restricted[] [source, cypher, role="noheader"] ---- -CREATE CONSTRAINT ... IS UNIQUE +size() ---- +a| +No longer works for paths. Only works for strings, lists and pattern expressions. See <> for more details. +|=== +=== Updated features + +[cols="2", options="header"] +|=== +| Feature +| Details a| label:syntax[] -label:added[] +label:extended[] [source, cypher, role="noheader"] ---- -SHOW CURRENT USER +CREATE CONSTRAINT [name] ON ... ---- a| -New Cypher command for showing current logged-in user and roles. +The create constraint syntax can now include a name. + +|=== +=== New features +[cols="2", options="header"] +|=== +| Feature +| Details a| label:functionality[] -label:added[] +label:new[] + +Pipelined runtime: [source, cypher, role="noheader"] ---- -SHOW [ALL \| BTREE] INDEX[ES] [BRIEF \| VERBOSE [OUTPUT]] +CYPHER runtime=pipelined ---- a| -New Cypher commands for listing indexes. +This Neo4j Enterprise Edition only feature involves a new runtime that has many performance enhancements. +a| +label:functionality[] +label:new[] + +<> +a| +New Cypher commands for administering multiple databases. a| label:functionality[] -label:added[] -[source, cypher, role="noheader"] ----- -SHOW [ALL \| UNIQUE \| NODE EXIST[S] \| RELATIONSHIP EXIST[S] \| EXIST[S] \| NODE KEY] CONSTRAINT[S] [BRIEF \| VERBOSE [OUTPUT]] ----- +label:new[] + +<> a| -New Cypher commands for listing constraints. +New Cypher commands for administering role-based access-control. +a| +label:functionality[] +label:new[] + +<> +a| +New Cypher commands for administering dbms, database, graph and sub-graph access control. a| -label:procedure[] -label:deprecated[] +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -db.indexes +CREATE INDEX [name] FOR (n:Label) ON (n.prop) ---- a| -Replaced by: +New syntax for creating indexes, which can include a name. + +a| +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW INDEXES +DROP INDEX name ---- +a| +<> for dropping an index by name. a| -label:procedure[] -label:deprecated[] +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -db.indexDetails +DROP CONSTRAINT name ---- a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW INDEXES YIELD * ----- +<> for dropping a constraint by name, no matter the type. a| -label:procedure[] -label:deprecated[] +label:clause[] +label:new[] [source, cypher, role="noheader"] ---- -db.constraints +WHERE EXISTS {...} ---- a| -Replaced by: +Existential sub-queries are sub-clauses used to filter the results of a `MATCH`, `OPTIONAL MATCH`, or `WITH` clause. + +a| +label:clause[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW CONSTRAINTS +USE neo4j ---- +a| +New clause to specify which graph a query, or query part, is executed against. + +|=== + +[[cypher-deprecations-additions-removals-3.5]] +== Version 3.5 + +=== Deprecated features + +[cols="2", options="header"] +|=== +| Feature +| Details a| -label:procedure[] -label:deprecated[] +label:functionality[] +label:deprecated[] + +Compiled runtime: [source, cypher, role="noheader"] ---- -db.schemaStatements +CYPHER runtime=compiled ---- a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW INDEXES YIELD * ----- -[source, cypher, role="noheader"] ----- -SHOW CONSTRAINTS YIELD * ----- - +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. a| -label:functionality[] -label:added[] + -New privilege: +label:function[] +label:deprecated[] [source, cypher, role="noheader"] ---- -SHOW INDEX +extract() ---- a| -New Cypher command for administering privilege for listing indexes. - +Replaced by <>. a| -label:functionality[] -label:added[] + -New privilege: +label:function[] +label:deprecated[] [source, cypher, role="noheader"] ---- -SHOW CONSTRAINT +filter() ---- a| -New Cypher command for administering privilege for listing constraints. -|=== - - -[[cypher-deprecations-additions-removals-4.1.3]] -== Version 4.1.3 -[options="header"] -|=== -| Feature | Type | Change | Details -| `CREATE INDEX [name] IF NOT EXISTS FOR ...` | Syntax | Added | Makes index creation idempotent. If an index with the name or schema already exists no error will be thrown -| `DROP INDEX name IF EXISTS` | Syntax | Added | Makes index deletion idempotent. If no index with the name exists no error will be thrown -| `CREATE CONSTRAINT [name] IF NOT EXISTS ON ...` | Syntax | Added | Makes constraint creation idempotent. If a constraint with the name or type and schema already exists no error will be thrown -| `DROP CONSTRAINT name IF EXISTS` | Syntax | Added | Makes constraint deletion idempotent. If no constraint with the name exists no error will be thrown -|=== - -[[cypher-deprecations-additions-removals-4.1]] -== Version 4.1 -[options="header"] -|=== -| Feature | Type | Change | Details -| `queryId` | Procedure | Updated | 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)` -| `PUBLIC` role | Functionality | Added | The `PUBLIC` role is automatically assigned to all users, giving them a set of base privileges -| `REVOKE MATCH` | Syntax | Added | The `MATCH` privilege can now be revoked -| `REVOKE ...` | Functionality | Restricted | 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 -| `SHOW PRIVILEGES` | Functionality | Updated | 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. -| `SHOW USERS` | Functionality | Added | New support for `YIELD` and `WHERE` clauses to allow filtering results. -| `SHOW ROLES` | Functionality | Added | New support for `YIELD` and `WHERE` clauses to allow filtering results. -| `SHOW DATABASES` | Functionality | Added | New support for `YIELD` and `WHERE` clauses to allow filtering results. -| `ALL DATABASE PRIVILEGES` | Functionality | Restricted | No longer includes the privileges `START DATABASE` and `STOP DATABASE` -| <> privileges | Functionality | Added | New Cypher commands for administering transaction management -| DBMS <> privileges | Functionality | Added | New Cypher commands for administering user management -| DBMS <> privileges | Functionality | Added | New Cypher commands for administering database management -| DBMS <> privileges | Functionality | Added | New Cypher commands for administering privilege management -| `ALL DBMS PRIVILEGES` | Functionality | Added | New Cypher command for administering role, user, database and privilege management -| `ALL GRAPH PRIVILEGES` | Functionality | Added | New Cypher command for administering read and write privileges -| Write privileges | Functionality | Added | New Cypher commands for administering write privileges -| `ON DEFAULT DATABASE` | Syntax | Added | New optional part of the Cypher commands for <> -|=== - -[[cypher-deprecations-additions-removals-4.0]] -== Version 4.0 -[options="header"] -|=== -| Feature | Type | Change | Details -| `rels()` | Function | Removed | Replaced by <> -| `toInt()` | Function | Removed | Replaced by <> -| `lower()` | Function | Removed | Replaced by <> -| `upper()` | Function | Removed | Replaced by <> -| `extract()` | Function | Removed | Replaced by <> -| `filter()` | Function | Removed | Replaced by <> -| `length()` | Function | Restricted | Restricted to only work on paths. See <> for more details. -| `size()` | Function | Restricted | No longer works for paths. Only works for strings, lists and pattern expressions. See <> for more details. -| `CYPHER planner=rule` (Rule planner) | Functionality | Removed | The `RULE` planner was removed in 3.2, but still possible to trigger using `START` or `CREATE UNIQUE` clauses. Now it is completely removed. -| `CREATE UNIQUE` | Clause | Removed | Running queries with this clause will cause a syntax error. Running with `CYPHER 3.5` will cause a runtime error due to the removal of the rule planner. -| `START` | Clause | Removed | Running queries with this clause will cause a syntax error. Running with `CYPHER 3.5` will cause a runtime error due to the removal of the rule planner. -| Explicit indexes | Functionality | Removed | 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 link:https://neo4j.com/docs/cypher-manual/3.5/schema/index/#explicit-indexes-procedures[built-in procedures for Neo4j 3.3 to 3.5]. -| `MATCH (n)-[rs*]-() RETURN rs` | Syntax | Deprecated | As in Cypher 3.2, this is replaced by `MATCH p=(n)-[*]-() RETURN relationships(p) AS rs` -| `MATCH (n)-[:A\|:B\|:C {foo: 'bar'}]-() RETURN n` | Syntax | Removed | Replaced by `MATCH (n)-[:A\|B\|C {foo: 'bar'}]-() RETURN n` -| `MATCH (n)-[x:A\|:B\|:C]-() RETURN n` | Syntax | Removed | Replaced by `MATCH (n)-[x:A\|B\|C]-() RETURN n` -| `MATCH (n)-[x:A\|:B\|:C*]-() RETURN n` | Syntax | Removed | Replaced by `MATCH (n)-[x:A\|B\|C*]-() RETURN n` -| `+{parameter}+` | Syntax | Removed | Replaced by <> -| `CYPHER runtime=pipelined` (Pipelined runtime) | Functionality | Added| This Neo4j Enterprise Edition only feature involves a new runtime that has many performance enhancements. -| `CYPHER runtime=compiled` (Compiled runtime) | Functionality | Removed| Replaced by the new `pipelined` runtime which covers a much wider range of queries. -| `CREATE INDEX [name] FOR (n:Label) ON (n.prop)` | Syntax | Added | New syntax for creating indexes, which can include a name. -| `CREATE CONSTRAINT [name] ON ...` | Syntax | Extended | The create constraint syntax can now include a name. -| `DROP INDEX name` | Syntax | Added | <> for dropping an index by name. -| `DROP CONSTRAINT name` | Syntax | Added | <> for dropping a constraint by name, no matter the type. -| `CREATE INDEX ON :Label(prop)` | Syntax | Deprecated | Replaced by `CREATE INDEX FOR (n:Label) ON (n.prop)` -| `DROP INDEX ON :Label(prop)` | Syntax | Deprecated | Replaced by `DROP INDEX name` -| `DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS NODE KEY` | Syntax | Deprecated | Replaced by `DROP CONSTRAINT name` -| `DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS UNIQUE` | Syntax | Deprecated | Replaced by `DROP CONSTRAINT name` -| `DROP CONSTRAINT ON (n:Label) ASSERT exists(n.prop)` | Syntax | Deprecated | Replaced by `DROP CONSTRAINT name` -| `DROP CONSTRAINT ON ()-[r:Type]-() ASSERT exists(r.prop)` | Syntax | Deprecated | Replaced by `DROP CONSTRAINT name` -| `WHERE EXISTS {...}` | Clause | Added | Existential sub-queries are sub-clauses used to filter the results of a `MATCH`, `OPTIONAL MATCH`, or `WITH` clause. -| <> | Functionality | Added | New Cypher commands for administering multiple databases -| <> | Functionality | Added | New Cypher commands for administering role-based access-control -| <> | Functionality | Added | New Cypher commands for administering dbms, database, graph and sub-graph access control -| `USE neo4j` | Clause| Added | New clause to specify which graph a query, or query part, is executed against. -|=== - - -[[cypher-deprecations-additions-removals-3.5]] -== Version 3.5 -[options="header"] -|=== -| Feature | Type | Change | Details -| `CYPHER runtime=compiled` (Compiled runtime) | Functionality | Deprecated | 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. -| `extract()` | Function | Deprecated | Replaced by <> -| `filter()` | Function | Deprecated | Replaced by <> +Replaced by <>. |===