Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions modules/ROOT/pages/appendix/gql-conformance/analogous-cypher.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,27 @@ These codes order the features in the table below.

| GF04
| Enhanced path functions
| GQL's `PATH_LENGTH()` function is equivalent to Cypher's xref:functions/scalar.adoc#functions-length[`length()`] function.
| Cypher provides the xref:functions/scalar.adoc#functions-path-length[path_length()] function, which is an alias to Cypher's xref:functions/scalar.adoc#functions-length[length()] function

| GF07
| Temporal duration functions
| Cypher provides the GQL naming alias xref:functions/temporal/duration.adoc#functions-duration-between-alias[`duration_between()`] function, which is an alias to Cypher's xref:functions/temporal/duration.adoc#functions-duration-between[`duration.between()`]..
In GQL, if either argument is not a temporal instant type, a data exception is raised (22G03).
In Cypher, a different error (e.g. invalid call signature) may be reported, but with the same severity.
Cypher returns the date difference in years, months, and days; GQL returns the date difference in days only.
For the same interval the results can therefore differ (e.g. P1M1D in Cypher vs P29D in GQL for 2026-02-01 to 2026-03-02).

| GF10
| Advanced aggregate functions: general set functions
| * GQL's `COLLECT_LIST()` function is equivalent to Cypher's xref:functions/aggregating.adoc#functions-collect[`collect()`] function.
* GQL's `STDEV_SAMP()` function is equivalent to Cypher's xref:functions/aggregating.adoc#functions-stdev[`stDev()`] function.
| * GQL's `STDEV_SAMP()` function is equivalent to Cypher's xref:functions/aggregating.adoc#functions-stdev[`stDev()`] function.
* GQL's `STDEV_POP()` function is equivalent to Cypher's xref:functions/aggregating.adoc#functions-stdevp[`stDevP()`] function.
Cypher provides the GQL naming aliases xref:functions/aggregating.adoc#functions-collect-list[`collect_list()`], xref:functions/aggregating.adoc#functions-stdev-samp[`stdev_samp()`], and xref:functions/aggregating.adoc#functions-stdev-pop[`stdev_pop()`].

| GF11
| Advanced aggregate functions: binary set functions
| * GQL's `PERCENTILE_CONT()` function is equivalent to Cypher's xref:functions/aggregating.adoc#functions-percentilecont[`percentileCont()`] function.
* GQL's `PERCENTILE_DISC()` function is equivalent to Cypher's xref:functions/aggregating.adoc#functions-percentiledisc[`percentileDisc()`] function.
Cypher provides the GQL naming aliases xref:functions/aggregating.adoc#functions-percentile-cont[`percentile_cont()`] and xref:functions/aggregating.adoc#functions-percentile-disc[`percentile_disc()`].

| GQ10, GQ11, GQ23, GQ24
| `FOR` statement: list value support, binding table support, `WITH ORDINALITY`, `WITH OFFSET`
Expand Down
49 changes: 24 additions & 25 deletions modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,12 @@ Cypher Shell also offers specific link:{neo4j-docs-base-uri}/operations-manual/c
* Feature GD01 implies conformance to GQL's `<set-statement>` (subclause 13.3).
GQL’s `SET` has no order dependencies because all right-hand side operations are completed before any assignments occur.
However, In Cypher’s `SET`, the order of rows can affect the outcome because changes made during execution may depend on the sequence of assignments.
The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.adoc[`ORDER BY`].

The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.adoc[`ORDER BY`].
| GF01
| Enhanced numeric functions
| xref:functions/mathematical-numeric.adoc#functions-abs[`abs()`], xref:functions/mathematical-numeric.adoc#functions-floor[`floor()`], xref:functions/mathematical-logarithmic.adoc#functions-sqrt[`sqrt()`].
| Note the following exceptions:
GQL supports `CEILING()` as a synonym for the `CEIL()` function.
Cypher only supports xref:functions/mathematical-numeric.adoc#functions-ceil[`ceil()`].
| GQL supports `CEILING()` as a synonym for the `CEIL()` function.
Cypher supports xref:functions/mathematical-numeric.adoc#functions-ceil[`ceil()`] and provides the GQL naming alias xref:functions/mathematical-numeric.adoc#functions-ceiling[`ceiling()`].

| GF02
| Trigonometric functions
Expand All @@ -130,12 +128,11 @@ Cypher only supports xref:functions/mathematical-numeric.adoc#functions-ceil[`ce

| GF03
| Logarithmic functions
| xref:functions/mathematical-logarithmic.adoc#functions-exp[`exp()`], xref:functions/mathematical-logarithmic.adoc#functions-log10[`log10()`].
| Note the following exceptions:

* Cypher uses the xref:functions/mathematical-logarithmic.adoc#functions-log[`log()`] function instead of GQL's `LN()` function.
| xref:functions/mathematical-logarithmic.adoc#functions-exp[`exp()`], xref:functions/mathematical-logarithmic.adoc#functions-log10[`log10()`], xref:functions/mathematical-logarithmic.adoc#functions-ln[`ln()`] .
| * Cypher uses the xref:functions/mathematical-logarithmic.adoc#functions-log[`log()`] function instead of GQL's `LN()` function.
In GQL, the natural logarithm function must raise an exception for input zero or negative.
In Cypher, `ln(0)` returns `-Infinity` and `ln(negative)` returns `NaN`.
* Cypher uses the xref:expressions/mathematical-operators.adoc[exponentiation operator (`^`)] instead of GQL's `POWER()` function.

| GF05
| Multi-character trim functions
| xref:functions/string.adoc#functions-btrim[`btrim()`], xref:functions/string.adoc#functions-ltrim[`ltrim()`], xref:functions/string.adoc#functions-rtrim[`rtrim()`]
Expand All @@ -151,7 +148,6 @@ In Cypher, `trim()` removes any whitespace character.
| Graph with open graph type
|
|

| GP01
| Inline procedure
| xref:subqueries/call-subquery.adoc[`CALL` subqueries]
Expand All @@ -173,7 +169,6 @@ In Cypher, `trim()` removes any whitespace character.
| Cypher’s `USE` clause supports static graph references (e.g. `USE myComposite.myGraph`)and dynamic graph references (e.g. `USE graph.byName(<expression>)`).
However, Cypher does not support GQL’s full graph reference syntax.
For example, GQL’s graph reference values `CURRENT_GRAPH` and `CURRENT_PROPERTY_GRAPH` cannot be used in Cypher.

| GQ03
| Composite query: `UNION`
| xref:queries/composed-queries/combined-queries.adoc[`UNION`]
Expand All @@ -193,33 +188,39 @@ For example, GQL’s graph reference values `CURRENT_GRAPH` and `CURRENT_PROPERT
| `ORDER BY` and page statement: `LIMIT`
| xref:clauses/limit.adoc[`LIMIT`], xref:clauses/order-by.adoc[`ORDER BY`]
| Cypher requires using the xref:clauses/with.adoc[`WITH`] clause, which GQL does not.

| GQ20
| Advanced linear composition with NEXT
| xref:queries/composed-queries/sequential-queries.adoc[]
| The GQL standard includes a `YIELD` clause for its `NEXT` statement which Cypher does not implement.

| GV39
| Temporal types: date, local datetime, and local time support
| xref:values-and-types/temporal.adoc[Temporal types], xref:functions/temporal/index.adoc#functions-date[`date()`]
| xref:values-and-types/temporal.adoc[Temporal types], xref:functions/temporal/index.adoc#functions-date[`date()`], xref:functions/temporal/index.adoc#functions-local-datetime[`local_datetime()`], xref:functions/temporal/index.adoc#functions-local-time[`local_time()`]
| Note the following exceptions:

* GQL defines a parameterless version of the xref:functions/temporal/index.adoc#functions-date[`date()`] function not in Cypher: `CURRENT_DATE`.
* GQL’s `LOCAL_TIME()` function is equivalent to Cypher’s xref:functions/temporal/index.adoc#functions-localtime[`localtime()`] function.
GQL also defines a parameterless version of the function not in Cypher: `LOCAL_TIME`.
* GQL’s `LOCAL_DATETIME()` function is equivalent to Cypher’s xref:functions/temporal/index.adoc#functions-localdatetime[`localdatetime()`] function.
GQL also defines a parameterless version of the function not in Cypher: `LOCAL_DATETIME`.
* GQL supports local_time() as a synonym for the localtime() function. Cypher supports localtime() and provides the GQL naming alias local_time().
* GQL supports local_datetime() as a synonym for the localdatetime() function. Cypher supports localdatetime() and provides the GQL naming alias local_datetime().

In GQL, invalid sets of time field names raise a data exception (22G05); Cypher uses an error of equivalent severity (22007/22N12).
Cypher also allows an optional `pattern` argument.
The GQL keyword `LOCAL_TIMESTAMP` is not introduced as a reserved keyword in Cypher.

| GV40
| Temporal types: zoned datetime and zoned time support
| xref:values-and-types/temporal.adoc[Temporal types]
| xref:values-and-types/temporal.adoc[Temporal types], xref:functions/temporal/index.adoc#functions-zoned-time[`zoned_time()`], xref:functions/temporal/index.adoc#functions-zoned-datetime[`zoned_datetime()`].
| Note the following exceptions:

* GQL’s `ZONED_TIME()` function is equivalent to Cypher’s xref:functions/temporal/index.adoc#functions-time[`time()`] function.
GQL also defines a parameterless version of the function not in Cypher: `CURRENT_TIME`.

In GQL, invalid sets of time (or timezone) field names raise a data exception (22G05); Cypher uses an error of equivalent severity (22007/22N12).
Cypher also allows an optional `pattern` argument.
The GQL keyword `CURRENT_TIME` is not introduced as a reserved keyword in Cypher.

* GQL’s `ZONED_DATETIME()` function is equivalent to Cypher’s xref:functions/temporal/index.adoc#functions-datetime[`datetime()`] function.
GQL also defines a parameterless version of the function not in Cypher: `CURRENT_TIMESTAMP`.

In GQL, invalid sets of datetime (or timezone) field names raise a data exception (22G05); Cypher uses an error of equivalent severity (22007/22N12).
Cypher also allows an optional `pattern` argument.
The GQL keyword `CURRENT_TIMESTAMP` is not introduced as a reserved keyword in Cypher.
| GV50
| List value types
| xref:values-and-types/lists.adoc[Lists]
Expand All @@ -244,12 +245,10 @@ GQL also defines a parameterless version of the function not in Cypher: `CURRENT
| Immaterial value types: null type support (`null`)
| xref:values-and-types/working-with-null.adoc[Working with `null`]
|

| GV71
| Immaterial value types: empty type support (`NOTHING`)]
| Immaterial value types: empty type support (`NOTHING`)
| xref:expressions/predicates/type-predicate-expressions.adoc#type-predicate-any-and-nothing[Type predicate expressions -> `ANY` and `NOTHING`]
|

|===

[NOTE]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Cypher 25 was introduced in Neo4j 2025.06 and can only be used on Neo4j 2025.06+
Features removed in Cypher 25 are still available on Neo4j 2025.06+ databases either by prepending a query with `CYPHER 5` or by having Cypher 5 as the default language for the database.
For more information, see xref:queries/select-version.adoc[].


[[cypher-deprecations-additions-removals-2026.02]]
== Neo4j 2026.02

Expand Down Expand Up @@ -178,6 +177,45 @@ ALTER CURRENT GRAPH DROP {

| Introduced the ability to drop element types and constraints from graph types using the `ALTER CURRENT GRAPH TYPE DROP` command.
For more information, see xref:schema/graph-types/drop-graph-type-elements.adoc[].

a|
label:functionality[]
label:new[]
GQL naming aliases for functions

[source, cypher]
----
RETURN ceiling(1.2) AS c, ln(2.0) AS natural_log,
char_length("Hello") AS len, lower("Neo4j") AS lower, upper("Neo4j") AS upper;
----
[source, cypher]
----
RETURN local_time() AS t, local_datetime() AS ldt,
zoned_time() AS zt, zoned_datetime() AS zdt;
----
[source, cypher]
----
RETURN duration_between(date("2020-01-01"), date("2020-02-01")) AS d;
----
[source, cypher]
----
MATCH p = (a)-[r]->(b)
RETURN path_length(p) AS path_len;
----
[source, cypher]
----
UNWIND [1, 2, 3] AS n
RETURN collect_list(n) AS list,
percentile_cont(n, 0.5) AS p50,
percentile_disc(n, 0.5) AS p50_disc,
stdev_samp(n) AS sd_samp,
stdev_pop(n) AS sd_pop;
----

a|
Cypher now provides GQL naming aliases so that queries written for other GQL implementations can run with minimal changes.
Aliases added: xref:functions/mathematical-numeric.adoc#functions-ceiling[`ceiling()`], xref:functions/temporal/index.adoc#functions-local-time[`local_time()`], xref:functions/temporal/index.adoc#functions-local-datetime[`local_datetime()`], xref:functions/temporal/index.adoc#functions-zoned-time[`zoned_time()`], xref:functions/temporal/index.adoc#functions-zoned-datetime[`zoned_datetime()`], xref:functions/temporal/duration.adoc#functions-duration-between-alias[`duration_between()`], xref:functions/scalar.adoc#functions-path-length[`path_length()`], xref:functions/mathematical-logarithmic.adoc#functions-ln[`ln()`], xref:functions/aggregating.adoc#functions-collect-list[`collect_list()`], xref:functions/aggregating.adoc#functions-percentile-cont[`percentile_cont()`], xref:functions/aggregating.adoc#functions-percentile-disc[`percentile_disc()`], xref:functions/aggregating.adoc#functions-stdev-samp[`stdev_samp()`], xref:functions/aggregating.adoc#functions-stdev-pop[`stdev_pop()`] and xref:functions/scalar.adoc#functions-char_length[`char_length()`].

|===

[[cypher-deprecations-additions-removals-2026.01]]
Expand Down
Loading