diff --git a/.github/workflows/docs-deploy-surge.yml b/.github/workflows/docs-deploy-surge.yml index 9278cd65..ed483e16 100644 --- a/.github/workflows/docs-deploy-surge.yml +++ b/.github/workflows/docs-deploy-surge.yml @@ -22,7 +22,7 @@ on: - completed jobs: - # [Optional] Restrict automatic dpeloyment to PRs from the upstream repo + # [Optional] Restrict automatic deployment to PRs from the upstream repo # For fork PRs, requires manual approval via the "preview" environment. # For PRs from the main repository this job is skipped and deploy-docs runs immediately. # Setup: create a "preview" environment in Settings → Environments with required reviewers. @@ -56,7 +56,7 @@ jobs: var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: ${{ env.RUN_ID }}, + run_id: process.env.RUN_ID, }); var matchArtifactDocs = artifacts.data.artifacts.filter((artifact) => { @@ -86,13 +86,32 @@ jobs: - id: suspicious-path-check name: Suspicious paths check + shell: bash env: ARTIFACT_DIR: ${{ runner.temp }}/artifacts/docs run: | + set -euo pipefail cd "$ARTIFACT_DIR" - if unzip -l docs.zip | grep -q "\.\./"; then + + mapfile -t ZIP_ENTRIES < <(zipinfo -1 docs.zip) + if [ "${#ZIP_ENTRIES[@]}" -eq 0 ]; then + echo "docs.zip is empty" exit 1 fi + for entry in "${ZIP_ENTRIES[@]}"; do + if [[ "$entry" =~ ^/ ]]; then + echo "Blocked absolute path in artifact: $entry" + exit 1 + fi + if [[ "$entry" =~ (^|/)\.\.(/|$) ]]; then + echo "Blocked path traversal in artifact: $entry" + exit 1 + fi + if [[ "$entry" == *\\* ]]; then + echo "Blocked Windows-style path separator in artifact: $entry" + exit 1 + fi + done - id: hidden-files-check name: Hidden files check @@ -132,6 +151,26 @@ jobs: cd "$ARTIFACT_DIR" unzip changelog.zip + # The changelog file is built from untrusted PR content and its contents + # are posted to the PR as a comment. A malicious artifact could make + # `changelog` a symlink pointing at an arbitrary file the runner can read, + # turning the comment step into an arbitrary-file-read. Reject anything + # that isn't a plain regular file before we read it. + - id: validate-changelog + name: Validate changelog is a regular file + if: ${{ steps.find-changelog.outputs.has-changelog == 'true' }} + env: + CHANGELOG_FILE: ${{ runner.temp }}/artifacts/changelog/changelog + run: | + if [ -L "$CHANGELOG_FILE" ]; then + echo "Security Alert: changelog is a symlink — refusing!" + exit 1 + fi + if [ ! -f "$CHANGELOG_FILE" ]; then + echo "changelog missing or not a regular file" + exit 1 + fi + - id: get-deploy-id name: Get deploy ID env: @@ -150,7 +189,7 @@ jobs: run: | deployurl=$ORG-$REPO-$DEPLOYID.surge.sh echo "deploy-url=$deployurl" >> $GITHUB_OUTPUT - + - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 with: node-version: lts/* @@ -165,7 +204,7 @@ jobs: mkdir -p "$DOCS_DEPLOY_DIR" # Copy only the built docs into a clean directory for deployment cp -R "$DOCS_SRC_DIR"/. "$DOCS_DEPLOY_DIR"/ - + - id: surge-deploy name: Deploy docs to surge shell: bash diff --git a/antora.yml b/antora.yml index 34ca5772..80f1b079 100644 --- a/antora.yml +++ b/antora.yml @@ -1,12 +1,12 @@ name: status-codes title: Status Codes for Errors & Notifications -version: '2026.06' +version: '2026.07' start_page: ROOT:index.adoc nav: - modules/ROOT/content-nav.adoc asciidoc: attributes: page-origin-private: false - neo4j-version: '2026.06' - neo4j-version-exact: '2026.06.0' - neo4j-buildnumber: '2026.06' + neo4j-version: '2026.07' + neo4j-version-exact: '2026.07.0' + neo4j-buildnumber: '2026.07' diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index d14f57f0..b4df78d7 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -38,6 +38,8 @@ **** xref:errors/gql-errors/22015.adoc[] **** xref:errors/gql-errors/22G03.adoc[] **** xref:errors/gql-errors/22G05.adoc[] +**** xref:errors/gql-errors/22G06.adoc[] +**** xref:errors/gql-errors/22G08.adoc[] **** xref:errors/gql-errors/22G0I.adoc[] **** xref:errors/gql-errors/22N00.adoc[] **** xref:errors/gql-errors/22N01.adoc[] @@ -299,6 +301,8 @@ **** xref:errors/gql-errors/42I74.adoc[] **** xref:errors/gql-errors/42I75.adoc[] **** xref:errors/gql-errors/42I78.adoc[] +**** xref:errors/gql-errors/42I79.adoc[] +**** xref:errors/gql-errors/42I80.adoc[] **** xref:errors/gql-errors/42N00.adoc[] **** xref:errors/gql-errors/42N01.adoc[] **** xref:errors/gql-errors/42N02.adoc[] @@ -416,6 +420,7 @@ **** xref:errors/gql-errors/42NAD.adoc[] **** xref:errors/gql-errors/42NAE.adoc[] **** xref:errors/gql-errors/42NAM.adoc[] +**** xref:errors/gql-errors/42NAP.adoc[] **** xref:errors/gql-errors/42NFC.adoc[] **** xref:errors/gql-errors/42NFD.adoc[] **** xref:errors/gql-errors/42NFE.adoc[] diff --git a/modules/ROOT/pages/errors/gql-errors/22G06.adoc b/modules/ROOT/pages/errors/gql-errors/22G06.adoc new file mode 100644 index 00000000..10238d19 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/22G06.adoc @@ -0,0 +1,20 @@ += 22G06 + + +== Status description +error: data exception - invalid date, time, or datetime function field value + +== Scenario + +A temporal field, such as `year`, `day`, `hour`, `minute`, in the map provided argument of one of the temporal functions `date()`, `time()`, `localtime()`, `datetime()`, `localdatetime()` has an invalid value. + +== Possible solution + +Adjust the value. + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] diff --git a/modules/ROOT/pages/errors/gql-errors/22G08.adoc b/modules/ROOT/pages/errors/gql-errors/22G08.adoc new file mode 100644 index 00000000..8f4ee691 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/22G08.adoc @@ -0,0 +1,20 @@ += 22G08 + + +== Status description +error: data exception - invalid duration function field value + +== Scenario + +A temporal field, such as `years`, `days`, `hours`, `minutes`, in the map provided argument of one of the temporal functions `duration()` has an invalid value. + +== Possible solution + +Adjust the value. + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] diff --git a/modules/ROOT/pages/errors/gql-errors/22N03.adoc b/modules/ROOT/pages/errors/gql-errors/22N03.adoc index c4234ee3..bac2cda2 100644 --- a/modules/ROOT/pages/errors/gql-errors/22N03.adoc +++ b/modules/ROOT/pages/errors/gql-errors/22N03.adoc @@ -3,6 +3,32 @@ == Status description error: data exception - specified numeric value out of range. Expected `{ <> }` to be of type `{ <> }` and in the range `{ <> }` to `{ <> }` but found `{ <> }`. +== Example scenario + +Try providing a value of `1005` for the `millisecond` field: + +[source,cypher] +---- +RETURN time({hour: 1, minute: 1, second: 1, millisecond: 1005}); +---- + +The query returns a chain of errors where GQLSTATUS 22N03 is the cause of GQLSTATUS xref:errors/gql-errors/22007.adoc[22007]: + +.GQLSTATUS error chain +[source, error] +---- +22N03: data exception - specified numeric value out of range. Expected 'Millisecond' to be of type INTEGER and in the range 0 to 999 but found 1005. + 22007: data exception - invalid date, time, or datetime format +---- + +== Possible solution + +Provide an integer value in the valid range for the `millisecond` field: + +[source,cypher] +---- +RETURN time({hour: 1, minute: 1, second: 2, millisecond: 5}); +---- ifndef::backend-pdf[] [discrete.glossary] diff --git a/modules/ROOT/pages/errors/gql-errors/22N40.adoc b/modules/ROOT/pages/errors/gql-errors/22N40.adoc index 14e17f9b..367f13ec 100644 --- a/modules/ROOT/pages/errors/gql-errors/22N40.adoc +++ b/modules/ROOT/pages/errors/gql-errors/22N40.adoc @@ -3,6 +3,34 @@ == Status description error: data exception - non-assignable temporal component. Cannot assign `{ <> }` of a `{ <> }`. +== Example scenario + +Try providing a string value for the `minute` field: + +[source,cypher] +---- +RETURN time({hour: 10, minute: '20', second: 23}); +---- + +The query returns a chain of errors where GQLSTATUS 22N40 is the cause of GQLSTATUS xref:errors/gql-errors/22G06.adoc[22G06]: + +.GQLSTATUS error chain +[source, error] +---- +22N40: data exception - non-assignable temporal component. Cannot assign 'minute' of a STRING. + 22G06: data exception - invalid date, time, or datetime function field value +---- + +== Possible solution + +Provide an integer value for the `minute` field + +[source,cypher] +---- +RETURN time({hour: 10, minute: 20, second: 23}); +---- + + ifndef::backend-pdf[] [discrete.glossary] == Glossary diff --git a/modules/ROOT/pages/errors/gql-errors/42I79.adoc b/modules/ROOT/pages/errors/gql-errors/42I79.adoc new file mode 100644 index 00000000..9c03c2bb --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I79.adoc @@ -0,0 +1,73 @@ += 42I79 + +== Status description +error: syntax error or access rule violation - invalid reference in subclause expression. Aggregation in subclause expression is not allowed to reference variables declared in the same clause `{ <> }`. + +== Explanation +A subclause expression is an expression used in a subclause (e.g., `WHERE` or `ORDER BY`) that belongs to a projection clause. +If that expression is aggregating, it is not allowed to reference aliases introduced in the same projection clause; only variables incoming to the clause are allowed. + +== Example scenario +Try sorting by an aggregation over a variable that the same `RETURN` clause introduces: + +.Aggregates over parity, which is declared in the same clause +[source,cypher] +---- +UNWIND [1, 2, 3, 4] AS x +RETURN x % 2 AS parity, sum(x) AS total + ORDER BY sum(parity); +---- + +`sum(parity)` is an aggregation, and `parity` is introduced by the same `RETURN` clause. + +The query returns a chain of errors where GQLSTATUS 42I79 is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]: + +.GQLSTATUS error chain +[source, error] + +---- +42I79: syntax error or access rule violation - invalid reference in subclause expression. Aggregation in subclause expression is not allowed to reference variables declared in the same clause: `parity`. (line 3, column 12 (offset: 76)) +" ORDER BY sum(parity)" + ^ + 42001: syntax error or access rule violation - invalid syntax +---- + +== Possible solutions + +To resolve this issue, aggregate over the underlying incoming expression instead of the same-clause alias: + +.Aggregates over the underlying expression x % 2 +[source,cypher] +---- +UNWIND [1, 2, 3, 4] AS x +RETURN x % 2 AS parity, sum(x) AS total + ORDER BY sum(x % 2); +---- + +Alternatively, compute the value in a preceding clause so it is an incoming variable rather than one declared in the same clause: + +.Introduces parity in an earlier clause +[source,cypher] +---- +UNWIND [1, 2, 3, 4] AS x +LET parity = x % 2 +RETURN parity, sum(x) AS total + ORDER BY sum(parity); +---- + +If the aggregation is meant to reuse a value already projected by the clause, reference that return item by its alias without re-aggregating it: + +.Sorts by the existing total aggregation +[source,cypher] +---- +UNWIND [1, 2, 3, 4] AS x +RETURN x % 2 AS parity, sum(x) AS total + ORDER BY total; +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I80.adoc b/modules/ROOT/pages/errors/gql-errors/42I80.adoc new file mode 100644 index 00000000..18ea1457 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I80.adoc @@ -0,0 +1,105 @@ += 42I80 + +== Status description +error: syntax error or access rule violation - invalid grouping element. The grouping element `{ <> }` is not a valid grouping key. `{ <> }` + +== Explanation +The `GROUP BY` clause is used to group the results of a clause by one or more expressions. +Each expression in the `GROUP BY` clause is called a grouping element. + +* A grouping element may reference an alias introduced by the same `WITH` or `RETURN` clause only if the grouping element is exactly that alias. +* A non-simple grouping element, such as a property access, a function call, or an arithmetic expression, cannot contain an alias. +* A grouping element cannot contain an aggregation result, since aggregations are computed per group and cannot be grouping keys. + +== Example scenarios + +Let's take the following example scenarios: + +=== Invalid grouping on projection item alias + +Try projecting `b AS a`, so that `a` is a projection item alias that shadows the incoming `a`, and then grouping by `a.p` — a property access on that alias: + +[source,cypher] +---- +UNWIND [{a: {p: 1}, b: 20}, {a: {p: 2}, b: 10}] AS row +WITH row.a AS a, row.b AS b +RETURN b AS a, count(*) AS cnt + GROUP BY a.p; +---- + +Because `a` is a projection item alias, the only valid way to group by it is the simple reference `a`; the property access `a.p` is not a valid grouping element. +The query returns a chain of errors where GQLSTATUS 42I80 is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]: + +.GQLSTATUS error chain +[source, error] +---- +42I80: syntax error or access rule violation - invalid grouping element. The grouping element 'a.p' is not a valid grouping key. A grouping element that references the projection item alias `a` must be a simple variable reference. (line 4, column 13 (offset: 126)) +" GROUP BY a.p" + ^ + 42001: syntax error or access rule violation - invalid syntax +---- + + +To fix the query, the preferred way is to reference the alias as a simple variable: + +.Group by the alias as a simple variable +[source, cypher] +---- +UNWIND [{a: {p: 1}, b: 20}, {a: {p: 2}, b: 10}] AS row +WITH row.a AS a, row.b AS b +RETURN b AS a, count(*) AS cnt + GROUP BY a; +---- + +To group on the incoming value, rename the projection item so it no longer shadows the incoming variable, then group by that expression: + +.Avoid shadowing the incoming variable +[source, cypher] +---- +UNWIND [{a: {p: 1}, b: 20}, {a: {p: 2}, b: 10}] AS row +WITH row.a AS a, row.b AS b +RETURN b AS bb, count(*) AS cnt + GROUP BY a.p; +---- + +=== Grouping element references an aggregation result + +Try grouping by the aggregation alias `cnt`: + +[source,cypher] +---- +UNWIND [{a: 1}, {a: 2}] AS row +WITH row.a AS a +RETURN a, count(*) AS cnt + GROUP BY a, cnt; +---- + +The query returns a chain of errors where GQLSTATUS 42I80 is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]: + +.GQLSTATUS error chain +[source, error] +---- +42I80: syntax error or access rule violation - invalid grouping element. The grouping element 'cnt' is not a valid grouping key. A grouping element cannot reference the aggregation `cnt`. (line 4, column 15 (offset: 87)) +" GROUP BY a, cnt" + ^ + 42001: syntax error or access rule violation - invalid syntax +---- + + +To resolve the error remove the aggregation result from the grouping elements: + +.Group only by non-aggregating expressions +[source, cypher] +---- +UNWIND [{a: 1}, {a: 2}] AS row +WITH row.a AS a +RETURN a, count(*) AS cnt + GROUP BY a; +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42N44.adoc b/modules/ROOT/pages/errors/gql-errors/42N44.adoc index 117a4346..c98d61a4 100644 --- a/modules/ROOT/pages/errors/gql-errors/42N44.adoc +++ b/modules/ROOT/pages/errors/gql-errors/42N44.adoc @@ -1,11 +1,49 @@ = 42N44 - == Status description -error: syntax error or access rule violation - inaccessible variable. It is not possible to access the variable `{ <> }` declared before the `{ <> }` clause when using `DISTINCT` or an aggregation. +error: syntax error or access rule violation - inaccessible variable. It is not possible to access the variable `{ <> }` declared before the `{ <> }` clause when using `{ <> }`. + +== Explanation +A `WITH` or `RETURN` clause that uses `DISTINCT`, an aggregation, or a `GROUP BY` clause defines a new set of available variables: grouping keys, projection item aliases, and aggregation results. +Any of its subclauses (`ORDER BY`, `WHERE`) can therefore reference only those grouping keys, projection item aliases, and aggregation results, not the variables that are in scope before the clause. +Referencing a variable that is declared before such a clause, and that is not a grouping key, projection item alias, or an aggregation result, is not possible and results in this error. + +== Example scenario + +Try grouping by `a` and aggregating with `count(*)`, and then sorting on `b`, which is not a grouping key, a projection item, or an aggregation result: + +[source,cypher] +---- +UNWIND [{a: 1, b: 10}, {a: 1, b: 20}, {a: 2, b: 30}] AS row +WITH row.a AS a, row.b AS b +RETURN a, count(*) AS cnt + GROUP BY a + ORDER BY b; +---- + +Because `b` is declared before the `RETURN` clause and is not part of the grouping, it cannot be accessed by the `ORDER BY` subclause. +The query returns a chain of errors where GQLSTATUS 42N44 is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]: +.GQLSTATUS error chain +[source, error] +---- +42N44: syntax error or access rule violation - inaccessible variable. It is not possible to access the variable `b` declared before the RETURN clause when using `DISTINCT`, an aggregation, or a `GROUP BY` clause. (line 5, column 12 (offset: 138)) +" ORDER BY b" + ^ + 42001: syntax error or access rule violation - invalid syntax +---- +To resolve the error, either add `b` as a grouping key (`GROUP BY a, b`), or order by a grouping key or aggregation result (for example, `ORDER BY a` or `ORDER BY cnt`). +For example: +[source,cypher] +---- +UNWIND [{a: 1, b: 10}, {a: 1, b: 20}, {a: 2, b: 30}] AS row +WITH row.a AS a, row.b AS b +RETURN a, count(*) AS cnt + GROUP BY a, b + ORDER BY b; +---- ifndef::backend-pdf[] [discrete.glossary] diff --git a/modules/ROOT/pages/errors/gql-errors/42NAP.adoc b/modules/ROOT/pages/errors/gql-errors/42NAP.adoc new file mode 100644 index 00000000..779b26c7 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42NAP.adoc @@ -0,0 +1,36 @@ += 42NAP + +== Status description +error: syntax error or access rule violation - unsupported trim specification. Unknown trim specification: `{ <> }`. + +== Example scenario + +Try trimming a string using an unrecognized trim specification instead of `LEADING`, `TRAILING`, or `BOTH`: + +[source,cypher] +---- +RETURN trim('INVALID', 'x', 'xxxhelloxxx') AS result; +---- + +The query returns a chain of errors where GQLSTATUS 42NAP is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]: + +.GQLSTATUS error chain +[source, error] +---- +42NAP: syntax error or access rule violation - unsupported trim specification. Unknown trim specification: 'INVALID'. + 42001: syntax error or access rule violation - invalid syntax +---- + +To resolve the error, use one of the supported trim specifications: `LEADING`, `TRAILING`, or `BOTH`: + +[source,cypher] +---- +RETURN trim('BOTH', 'x', 'xxxhelloxxx') AS result; +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] diff --git a/modules/ROOT/pages/errors/gql-errors/index.adoc b/modules/ROOT/pages/errors/gql-errors/index.adoc index e34cec54..5a3ff346 100644 --- a/modules/ROOT/pages/errors/gql-errors/index.adoc +++ b/modules/ROOT/pages/errors/gql-errors/index.adoc @@ -155,6 +155,14 @@ Status description:: error: data exception - invalid value type Status description:: error: data exception - invalid date, time, or datetime function field name +=== xref:errors/gql-errors/22G06.adoc[22G06] + +Status description:: error: data exception - invalid date, time, or datetime function field value + +=== xref:errors/gql-errors/22G08.adoc[22G08] + +Status description:: error: data exception - invalid duration function field value + === xref:errors/gql-errors/22G0I.adoc[22G0I] Status description:: error: data exception - invalid duration field. `{ <> }` is not a valid duration field. @@ -1211,6 +1219,14 @@ Status description:: error: syntax error or access rule violation - index or con Status description:: error: syntax error or access rule violation - unsupported procedure or function in language version. The procedure or function is available in `CYPHER { <> }`. Consider changing the database default Cypher version using `ALTER DATABASE SET DEFAULT LANGUAGE` or prefix the query with `CYPHER { <> }`. +=== xref:errors/gql-errors/42I79.adoc[42I79] + +Status description:: error: syntax error or access rule violation - invalid reference in subclause expression. Aggregation in subclause expression is not allowed to reference variables declared in the same clause `{ <> }`. + +=== xref:errors/gql-errors/42I80.adoc[42I80] + +Status description:: error: syntax error or access rule violation - invalid grouping element. The grouping element `{ <> }` is not a valid grouping key. `{ <> }` + === xref:errors/gql-errors/42N00.adoc[42N00] Status description:: error: syntax error or access rule violation - graph reference not found. A graph reference with the name `{ <> }` was not found. Verify that the spelling is correct. @@ -1405,7 +1421,7 @@ Status description:: error: syntax error or access rule violation - unsupported === xref:errors/gql-errors/42N44.adoc[42N44] -Status description:: error: syntax error or access rule violation - inaccessible variable. It is not possible to access the variable `{ <> }` declared before the `{ <> }` clause when using `DISTINCT` or an aggregation. +Status description:: error: syntax error or access rule violation - inaccessible variable. It is not possible to access the variable `{ <> }` declared before the `{ <> }` clause when using `{ <> }`. === xref:errors/gql-errors/42N45.adoc[42N45] @@ -1679,6 +1695,10 @@ Status description:: error: syntax error or access rule violation - auth rule al Status description:: error: syntax error or access rule violation - unsupported temporal function form in auth rule condition. `{ <> }` cannot be used in auth rule conditions as it retrieves the current time. Only transaction start time is available at the time of auth rule evaluation. Use `{ <> }` instead. +=== xref:errors/gql-errors/42NAP.adoc[42NAP] + +Status description:: error: syntax error or access rule violation - unsupported trim specification. Unknown Trim Specification: `{ <> }`. + === xref:errors/gql-errors/42NFC.adoc[42NFC] Status description:: error: syntax error or access rule violation - auth info validation error. Authentication and/or authorization could not be validated. See security logs for details. diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 3c3a030f..0e9b62be 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -1850,8 +1850,10 @@ Please use a path with a length of 1 [r*1..1] instead or a Match with a limit. - The query used a deprecated function. (`%s`) - The query used a deprecated procedure. (`%s`) - The query used a deprecated runtime option. (`%s`) -- `text-1.0` and `text-2.0` (from Neo4j 2025.09 onwards) providers for text indexes are deprecated and will be removed in a future version. +- label:deprecated[Deprecated in 2025.09]`text-1.0` and `text-2.0` providers for text indexes are deprecated and will be removed in a future version. Please use `text-3.0` instead. +- label:deprecated[Deprecated in 2026.07] The subclause expression `%s` contains an ambiguous reference to variable `%s` and is deprecated. It is replaced by referencing the projection item expression by an alias or using the `GROUP BY` clause. +- label:deprecated[Deprecated in 2026.07] The subclause expression `%s` contains a reference to the complex projection item expression `%s` and is deprecated. It is replaced by referencing the projection item expression by an alias. |Category m|DEPRECATION |GQLSTATUS code @@ -2873,6 +2875,182 @@ RETURN CASE t.ibanNumber ELSE "used different account" END AS check ---- +====== +===== +.Ambiguous reference to a variable in a subclause expression +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop AS b, b AS a + ORDER BY a.prop +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +The subclause expression `a.prop` contains an ambiguous reference to variable `a` and is deprecated. It is replaced by referencing the projection item expression by an alias or using the `GROUP BY` clause. + +Suggestions for improvement:: +Reference the projection item by its alias rather than repeating the expression. ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop AS b, b AS a + ORDER BY b +---- + +====== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop AS b, b AS a + ORDER BY a.prop +---- + +Description of the returned code:: +The subclause expression `a.prop` contains an ambiguous reference to variable `a` and is deprecated. It is replaced by referencing the projection item expression by an alias or using the `GROUP BY` clause. + +Suggestions for improvement:: +Reference the projection item by its alias rather than repeating the expression. ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop AS b, b AS a + ORDER BY b +---- + +====== +===== + +.Reference to a complex projection item expression in a subclause expression +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a) +RETURN a.prop * 2 AS x, count(*) AS count + ORDER BY a.prop * 2 + 1 +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +The subclause expression `a.prop * 2 + 1` contains a reference to the complex projection item expression `a.prop * 2` and is deprecated. It is replaced by referencing the projection item expression by an alias. + +Suggestions for improvement:: +Reference the projection item by its alias rather than repeating the expression. ++ +[source,cypher] +---- +MATCH (a) +RETURN a.prop * 2 AS x, count(*) AS count + ORDER BY x + 1 +---- + +====== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a) +RETURN a.prop * 2 AS x, count(*) AS count + ORDER BY a.prop * 2 + 1 +---- + +Description of the returned code:: +The subclause expression `a.prop * 2 + 1` contains a reference to the complex projection item expression `a.prop * 2` and is deprecated. It is replaced by referencing the projection item expression by an alias. + +Suggestions for improvement:: +Reference the projection item by its alias rather than repeating the expression. ++ +[source,cypher] +---- +MATCH (a) +RETURN a.prop * 2 AS x, count(*) AS count + ORDER BY x + 1 +---- + +====== +===== + +.Ambiguous and complex reference in a subclause expression +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop * 2 AS x, b AS a, count(*) AS count + ORDER BY a.prop * 2 + 1 +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +The subclause expression `a.prop * 2 + 1` contains an ambiguous reference to variable `a` and a reference to the complex projection item expression `a.prop * 2` and is deprecated. It is replaced by referencing the projection item expression by an alias or using the `GROUP BY` clause. + +Suggestions for improvement:: +Reference the projection item by its alias rather than repeating the expression. ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop * 2 AS x, b AS a, count(*) AS count + ORDER BY x + 1 +---- + +====== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop * 2 AS x, b AS a, count(*) AS count + ORDER BY a.prop * 2 + 1 +---- + +Description of the returned code:: +The subclause expression `a.prop * 2 + 1` contains an ambiguous reference to variable `a` and a reference to the complex projection item expression `a.prop * 2` and is deprecated. It is replaced by referencing the projection item expression by an alias or using the `GROUP BY` clause. + +Suggestions for improvement:: +Reference the projection item by its alias rather than repeating the expression. ++ +[source,cypher] +---- +MATCH (a), (b) +RETURN a.prop * 2 AS x, b AS a, count(*) AS count + ORDER BY x + 1 +---- + ====== ===== diff --git a/modules/ROOT/partials/glossary.adoc b/modules/ROOT/partials/glossary.adoc index 12affd12..4392c828 100644 --- a/modules/ROOT/partials/glossary.adoc +++ b/modules/ROOT/partials/glossary.adoc @@ -51,6 +51,7 @@ [[graphTypeElement]]$graphTypeElement:: An element of a graph type, for example `(:Node => { name :: STRING})`, or `(:Source)-[:REL =>]->(:Target)`. [[graphTypeReference]]$graphTypeReference:: Graph type reference, for example, `(:Node =>)` or `p`. [[graphTypeOperation]]$graphTypeOperation:: Graph type operation, for example, one of `SET`, `ADD`, `DROP` or `ALTER`. +[[groupingConstructs]]$groupingConstructs:: Constructs that establish a grouping and thereby restrict which variables remain accessible, for example, `DISTINCT`, an aggregation, or a `GROUP BY` clause. [[hint]]$hint:: Freeform description of a hint, for example, `USING INDEX n:N(prop)`. [[hintList]]$hintList:: A list of free form descriptions of hints like `USING INDEX n:N(prop)`. [[ident]]$ident:: A generic identifier, for example `my_identifier`. diff --git a/publish.yml b/publish.yml index e20d1e02..5c3ce333 100644 --- a/publish.yml +++ b/publish.yml @@ -34,6 +34,9 @@ asciidoc: - "@neo4j-documentation/macros" - "@neo4j-antora/mark-terms" attributes: + page-tabs: reference@ + page-tabs-index: 10 + page-tabs-group: dbms page-theme: docs page-type: Docs page-search-type: Docs