From da8870b0a3f9eb0e56331fb114b22d3e97fccedf Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Thu, 6 Jan 2022 17:42:19 +0000 Subject: [PATCH 1/2] grouped the features for a better readability --- ...tions-additions-and-compatibility.asciidoc | 1219 ++++++++++++----- 1 file changed, 911 insertions(+), 308 deletions(-) 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..dc2f434ed1a 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,78 @@ 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 CONSTRAINT [name] +ON (node:Label) +ASSERT node.property IS NOT NULL ---- a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS ----- -Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. +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 +367,7 @@ Now allows setting home database for user. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- ALTER USER ... @@ -309,7 +379,7 @@ Now allows removing home database for user. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE USER ... @@ -321,7 +391,7 @@ a| a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- SHOW HOME DATABASE @@ -332,8 +402,7 @@ New syntax for showing the home database of the current user. a| label:syntax[] -label:added[] + -New privilege: +label:new[] [source, cypher, role="noheader"] ---- SET USER HOME DATABASE @@ -344,7 +413,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 +425,7 @@ New syntax for privileges affecting home database. a| label:syntax[] -label:added[] + +label:new[] + For privilege commands: [source, cypher, role="noheader"] ---- @@ -366,41 +435,9 @@ 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: -[source, cypher, role="noheader"] ----- -ON DEFAULT GRAPH ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -ON HOME GRAPH ----- - - a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE INDEX FOR ()-[r:TYPE]-() ... @@ -412,7 +449,7 @@ They can be dropped by using their name. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE LOOKUP INDEX ... @@ -422,33 +459,9 @@ Create token lookup index for nodes with any labels or relationships with any re They can be dropped by using their name. -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW FULLTEXT INDEXES ----- -a| -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 LOOKUP INDEXES ----- -a| -Now allows easy filtering for `SHOW INDEXES` on token lookup indexes. + -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. - - a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE DATABASE ... @@ -461,7 +474,7 @@ This can be used to specify a specific cluster node to seed data from. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- RENAME ROLE @@ -472,7 +485,7 @@ New Cypher command for changing the name of a role. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- RENAME USER @@ -483,7 +496,7 @@ New Cypher command for changing the name of a user. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- SHOW PROCEDURE[S] @@ -498,7 +511,7 @@ New Cypher commands for listing procedures. a| label:functionality[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- SHOW [ALL \| BUILT IN \| USER DEFINED] FUNCTION[S] @@ -513,7 +526,7 @@ New Cypher commands for listing functions. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE FULLTEXT INDEX ... @@ -523,26 +536,148 @@ Allows creating fulltext indexes on nodes or relationships. They can be dropped by using their name. |=== - [[cypher-deprecations-additions-removals-4.2]] == Version 4.2 +=== Deprecated features + [cols="2", options="header"] |=== | Feature | Details a| -label:functionality[] -label:added[] +label:syntax[] +label:deprecated[] [source, cypher, role="noheader"] ---- -SHOW PRIVILEGES [AS [REVOKE] COMMAND[S]] +0... ---- a| -Privileges can now be shown as Cypher commands. +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:updated[] @@ -593,55 +728,49 @@ round(expression, precision, mode) ---- a| The `round()` function can now take two additional arguments to specify rounding precision and rounding mode. +|=== +=== New features -a| -label:syntax[] -label:added[] -[source, cypher, role="noheader"] ----- -DEFAULT GRAPH ----- -a| -New optional part of the Cypher commands for <>. - +[cols="2", options="header"] +|=== +| Feature +| Details a| -label:syntax[] -label:added[] +label:functionality[] +label:new[] [source, cypher, role="noheader"] ---- -0o... +SHOW PRIVILEGES [AS [REVOKE] COMMAND[S]] ---- a| -Cypher now interprets literals with prefix `0o` as an octal integer literal. - +Privileges can now be shown as Cypher commands. a| label:syntax[] -label:deprecated[] +label:new[] [source, cypher, role="noheader"] ---- -0... +DEFAULT GRAPH ---- a| -Replaced by `+0o...+` (see above). +New optional part of the Cypher commands for <>. a| label:syntax[] -label:deprecated[] +label:new[] [source, cypher, role="noheader"] ---- -0X... +0o... ---- a| -Only `+0x...+` (lowercase x) is supported. - +Cypher now interprets literals with prefix `0o` as an octal integer literal. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- SET [PLAINTEXT \| ENCRYPTED] PASSWORD @@ -652,7 +781,7 @@ For `CREATE USER` and `ALTER USER`, it is now possible to set (or update) a pass a| label:functionality[] -label:added[] + +label:new[] + New privilege: [source, cypher, role="noheader"] ---- @@ -665,7 +794,7 @@ See <>. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE [BTREE] INDEX ... [OPTIONS {...}] @@ -676,7 +805,7 @@ Allows setting index provider and index configuration when creating an index. a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE CONSTRAINT ... IS NODE KEY [OPTIONS {...}] @@ -687,7 +816,7 @@ Allows setting index provider and index configuration for the backing index when a| label:syntax[] -label:added[] +label:new[] [source, cypher, role="noheader"] ---- CREATE CONSTRAINT ... IS UNIQUE [OPTIONS {...}] @@ -695,255 +824,729 @@ CREATE CONSTRAINT ... IS UNIQUE [OPTIONS {...}] a| Allows setting index provider and index configuration for the backing index when creating a uniqueness constraint. - a| -label:procedure[] -label:deprecated[] +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -db.createIndex +SHOW CURRENT USER ---- a| -Replaced by `CREATE INDEX` command. +New Cypher command for showing current logged-in user and roles. a| -label:procedure[] -label:deprecated[] +label:functionality[] +label:new[] [source, cypher, role="noheader"] ---- -db.createNodeKey +SHOW [ALL \| BTREE] INDEX[ES] [BRIEF \| VERBOSE [OUTPUT]] ---- a| -Replaced by: -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT ... IS NODE KEY ----- +New Cypher commands for listing indexes. a| -label:procedure[] -label:deprecated[] +label:functionality[] +label:new[] [source, cypher, role="noheader"] ---- -db.createUniquePropertyConstraint +SHOW [ALL \| UNIQUE \| NODE EXIST[S] \| RELATIONSHIP EXIST[S] \| EXIST[S] \| NODE KEY] CONSTRAINT[S] [BRIEF \| VERBOSE [OUTPUT]] ---- a| -Replaced by: -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT ... IS UNIQUE ----- - +New Cypher commands for listing constraints. a| -label:syntax[] -label:added[] +label:functionality[] +label:new[] + +New privilege: [source, cypher, role="noheader"] ---- -SHOW CURRENT USER +SHOW INDEX ---- a| -New Cypher command for showing current logged-in user and roles. +New Cypher command for administering privilege for listing indexes. a| label:functionality[] -label:added[] +label:new[] + +New privilege: [source, cypher, role="noheader"] ---- -SHOW [ALL \| BTREE] INDEX[ES] [BRIEF \| VERBOSE [OUTPUT]] +SHOW CONSTRAINT ---- a| -New Cypher commands for listing indexes. +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:functionality[] -label:added[] +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -SHOW [ALL \| UNIQUE \| NODE EXIST[S] \| RELATIONSHIP EXIST[S] \| EXIST[S] \| NODE KEY] CONSTRAINT[S] [BRIEF \| VERBOSE [OUTPUT]] +CREATE INDEX [name] IF NOT EXISTS FOR ... ---- a| -New Cypher commands for listing constraints. - +Makes index creation idempotent. If an index with the name or schema already exists no error will be thrown. a| -label:procedure[] -label:deprecated[] +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -db.indexes +DROP INDEX name IF EXISTS ---- a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW INDEXES ----- - +Makes index deletion idempotent. If no index with the name exists no error will be thrown. a| -label:procedure[] -label:deprecated[] +label:syntax[] +label:new[] [source, cypher, role="noheader"] ---- -db.indexDetails +CREATE CONSTRAINT [name] IF NOT EXISTS ON ... ---- a| -Replaced by: +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"] ---- -SHOW INDEXES YIELD * +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:procedure[] -label:deprecated[] +label:functionality[] +label:restricted[] [source, cypher, role="noheader"] ---- -db.constraints +REVOKE ... ---- a| -Replaced by: +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"] ---- -SHOW CONSTRAINTS +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:deprecated[] +label:updated[] [source, cypher, role="noheader"] ---- -db.schemaStatements +queryId ---- a| -Replaced by: +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 INDEXES YIELD * +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[] + +For roles: [source, cypher, role="noheader"] ---- -SHOW CONSTRAINTS YIELD * +PUBLIC ---- +a| +The `PUBLIC` role is automatically assigned to all users, giving them a set of base privileges. +a| +label:syntax[] +label:new[] + +For priviledges: +[source, cypher, role="noheader"] +---- +REVOKE MATCH +---- +a| +The `MATCH` privilege can now be revoked. a| label:functionality[] -label:added[] + -New privilege: +label:new[] [source, cypher, role="noheader"] ---- -SHOW INDEX +SHOW USERS ---- a| -New Cypher command for administering privilege for listing indexes. +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:added[] + -New privilege: +label:new[] [source, cypher, role="noheader"] ---- -SHOW CONSTRAINT +SHOW DATABASES ---- a| -New Cypher command for administering privilege for listing constraints. +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 command for administering role, user, database and privilege management. + + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +ALL GRAPH PRIVILEGES +---- +a| +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:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +ON DEFAULT DATABASE +---- +a| +New optional part of the Cypher commands for <>. |=== +[[cypher-deprecations-additions-removals-4.0]] +== Version 4.0 + +=== Removed features -[[cypher-deprecations-additions-removals-4.1.3]] -== Version 4.1.3 -[options="header"] +[cols="2", 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 +| Feature +| Details + +a| +label:function[] +label:removed[] +[source, cypher, role="noheader"] +---- +rels() +---- +a| +Replaced by <>. + +a| +label:function[] +label:removed[] +[source, cypher, role="noheader"] +---- +toInt() +---- +a| +Replaced by <>. + +a| +label:function[] +label:removed[] +[source, cypher, role="noheader"] +---- +lower() +---- +a| +Replaced by <>. + +a| +label:function[] +label:removed[] +[source, cypher, role="noheader"] +---- +upper() +---- +a| +Replaced by <>. + +a| +label:function[] +label:removed[] +[source, cypher, role="noheader"] +---- +extract() +---- +a| +Replaced by <>. + +a| +label:function[] +label:removed[] +[source, cypher, role="noheader"] +---- +filter() +---- +a| +Replaced by <>. + +a| +label:functionality[] +label:removed[] + +For Rule planner: +[source, cypher, role="noheader"] +---- +CYPHER planner=rule +---- +a| +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: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"] +---- +CYPHER runtime=compiled +---- +a| +Replaced by the new `pipelined` runtime which covers a much wider range of queries. + + +a| +label:clause[] +label:removed[] +[source, cypher, role="noheader"] +---- +CREATE UNIQUE +---- +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: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:removed[] +[source, cypher, role="noheader"] +---- +MATCH (n)-[:A\|:B\|:C {foo: 'bar'}]-() RETURN n +---- +a| +Replaced by `MATCH (n)-[:A\|B\|C {foo: 'bar'}]-() RETURN n`. + +a| +label:syntax[] +label:removed[] +[source, cypher, role="noheader"] +---- +MATCH (n)-[x:A\|:B\|:C]-() RETURN n +---- +a| +Replaced by `MATCH (n)-[x:A\|B\|C]-() RETURN n`. + + +a| +label:syntax[] +label:removed[] +[source, cypher, role="noheader"] +---- +MATCH (n)-[x:A\|:B\|:C*]-() RETURN n +---- +a| +Replaced by `MATCH (n)-[x:A\|B\|C*]-() RETURN n`. + + +a| +label:syntax[] +label:removed[] +[source, cypher, role="noheader"] +---- +{parameter} +---- +a| +Replaced by <>. |=== -[[cypher-deprecations-additions-removals-4.1]] -== Version 4.1 -[options="header"] +=== Deprecated features + +[cols="2", 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 <> +| Feature +| Details + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +MATCH (n)-[rs*]-() RETURN rs +---- +a| +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:deprecated[] +[source, cypher, role="noheader"] +---- +CREATE INDEX ON :Label(prop) +---- +a| +Replaced by `CREATE INDEX FOR (n:Label) ON (n.prop)`. + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +DROP INDEX ON :Label(prop) +---- +a| +Replaced by `DROP INDEX name`. + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS NODE KEY +---- +a| +Replaced by `DROP CONSTRAINT name`. + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS UNIQUE +---- +a| +Replaced by `DROP CONSTRAINT name`. + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +DROP CONSTRAINT ON (n:Label) ASSERT exists(n.prop) +---- +a| +Replaced by `DROP CONSTRAINT name`. + +a| +label:syntax[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +DROP CONSTRAINT ON ()-[r:Type]-() ASSERT exists(r.prop) +---- +a| +Replaced by `DROP CONSTRAINT name`. + |=== -[[cypher-deprecations-additions-removals-4.0]] -== Version 4.0 -[options="header"] +=== Restricted features + +[cols="2", 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. +| Feature +| Details + +a| +label:function[] +label:restricted[] +[source, cypher, role="noheader"] +---- +length() +---- +a| +Restricted to only work on paths. See <> for more details. + +a| +label:function[] +label:restricted[] +[source, cypher, role="noheader"] +---- +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:extended[] +[source, cypher, role="noheader"] +---- +CREATE CONSTRAINT [name] ON ... +---- +a| +The create constraint syntax can now include a name. + +|=== +=== New features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:new[] + +For pipelined runtime: +[source, cypher, role="noheader"] +---- +CYPHER runtime=pipelined +---- +a| +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:new[] + +<> +a| +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:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE INDEX [name] FOR (n:Label) ON (n.prop) +---- +a| +New syntax for creating indexes, which can include a name. + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +DROP INDEX name +---- +a| +<> for dropping an index by name. + + +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +DROP CONSTRAINT name +---- +a| +<> for dropping a constraint by name, no matter the type. + + +a| +label:clause[] +label:new[] +[source, cypher, role="noheader"] +---- +WHERE EXISTS {...} +---- +a| +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"] +---- +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 -[options="header"] + +=== Deprecated features + +[cols="2", 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 <> +| Feature +| Details + +a| +label:functionality[] +label:deprecated[] + +Compiled runtime: +[source, cypher, role="noheader"] +---- +CYPHER runtime=compiled +---- +a| +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:function[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +extract() +---- +a| +Replaced by <>. + +a| +label:function[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +filter() +---- +a| +Replaced by <>. |=== From b1f867098b0528305d6233f525c4462f858fbda9 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Fri, 7 Jan 2022 17:15:03 +0000 Subject: [PATCH 2/2] applied suggestions from PR review --- ...tions-additions-and-compatibility.asciidoc | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) 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 dc2f434ed1a..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 @@ -89,7 +89,7 @@ prop IS NULL a| label:syntax[] label:deprecated[] + -`BRIEF [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS` +`BRIEF [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS`. a| Replaced by default output columns. @@ -314,6 +314,18 @@ Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. | Feature | Details +a| +label:syntax[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE DATABASE ... +[OPTIONS {...}] +---- +a| +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[] @@ -402,7 +414,8 @@ New syntax for showing the home database of the current user. a| label:syntax[] -label:new[] +label:new[] + +New privilege: [source, cypher, role="noheader"] ---- SET USER HOME DATABASE @@ -434,43 +447,39 @@ ON HOME GRAPH a| New syntax for privileges affecting home graph. - a| -label:functionality[] +label:syntax[] label:new[] [source, cypher, role="noheader"] ---- -CREATE INDEX FOR ()-[r:TYPE]-() ... +CREATE FULLTEXT INDEX ... ---- a| -Allows creating indexes on relationships with a particular relationship type and property combination. +Allows creating fulltext indexes on nodes or relationships. They can be dropped by using their name. - a| label:functionality[] label:new[] [source, cypher, role="noheader"] ---- -CREATE LOOKUP INDEX ... +CREATE INDEX FOR ()-[r:TYPE]-() ... ---- a| -Create token lookup index for nodes with any labels or relationships with any relationship type. +Allows creating indexes on relationships with a particular relationship type and property combination. They can be dropped by using their name. a| -label:syntax[] +label:functionality[] label:new[] [source, cypher, role="noheader"] ---- -CREATE DATABASE ... -[OPTIONS {...}] +CREATE LOOKUP INDEX ... ---- a| -New syntax to pass options to `CREATE DATABASE`. -This can be used to specify a specific cluster node to seed data from. - +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[] @@ -523,17 +532,6 @@ SHOW [ALL \| BUILT IN \| USER DEFINED] FUNCTION[S] a| New Cypher commands for listing functions. - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE FULLTEXT INDEX ... ----- -a| -Allows creating fulltext indexes on nodes or relationships. -They can be dropped by using their name. |=== [[cypher-deprecations-additions-removals-4.2]] @@ -1002,7 +1000,7 @@ The returned privileges are a closer match to the original grants and denies, e. a| label:functionality[] label:new[] + -For roles: +New role: [source, cypher, role="noheader"] ---- PUBLIC @@ -1013,7 +1011,7 @@ The `PUBLIC` role is automatically assigned to all users, giving them a set of b a| label:syntax[] label:new[] + -For priviledges: +For privileges: [source, cypher, role="noheader"] ---- REVOKE MATCH @@ -1423,7 +1421,7 @@ The create constraint syntax can now include a name. a| label:functionality[] label:new[] + -For pipelined runtime: +Pipelined runtime: [source, cypher, role="noheader"] ---- CYPHER runtime=pipelined