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 fbf4219dcf7..8ffb4528cc1 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 @@ -7,74 +7,437 @@ Cypher is a language that is constantly evolving. New features get added to the language continuously, and occasionally, some features become deprecated and are subsequently removed. -- -* <> -** <> -** <> -** <> -** <> -** <> -** <> -** <> -* <> -* <> - - -[[cypher-deprecations-additions-removals]] -== Removals, deprecations, additions, and extensions - -The following tables list all of the features which have been removed, deprecated, added, or extended in Cypher. +This section list 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. - [[cypher-deprecations-additions-removals-4.0]] -=== Version 4.0 -[options="header"] +== Version 4.0 + +=== Removed features + +[cols="2", options="header"] +|=== +| 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 <>. +|=== + +=== Deprecated features + +[cols="2", options="header"] +|=== +| 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`. + |=== -| 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 + +=== Restricted features + +[cols="2", options="header"] +|=== +| 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[] + +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"] +== Version 3.5 + +=== 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 <>. |===