diff --git a/.github/workflows/docs-pr-checks.yml b/.github/workflows/docs-pr-checks.yml index 05b472c7..d1eba0ee 100644 --- a/.github/workflows/docs-pr-checks.yml +++ b/.github/workflows/docs-pr-checks.yml @@ -7,7 +7,6 @@ on: - "dev" - "5.x" - "4.[0-9]" - - "gql-notifications" jobs: diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index b4d31306..36e4e76f 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -20,7 +20,8 @@ jobs: uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v1.1.2 with: deploy-id: 0 - retain-artifacts: 14 + retain-artifacts: 28 + package-script: 'publish-verify' # Parse the json log output from the HTML build, and output warnings and errors as annotations # Optionally, fail the build if there are warnings or errors diff --git a/.github/workflows/docs-teardown.yml b/.github/workflows/docs-teardown.yml index 8d3074f4..6b9ed36f 100644 --- a/.github/workflows/docs-teardown.yml +++ b/.github/workflows/docs-teardown.yml @@ -7,7 +7,6 @@ on: - "dev" - "5.x" - "4.[0-9]" - - "gql-notifications" types: - closed diff --git a/README.adoc b/README.adoc index 8a1a1fd5..e4c11f22 100644 --- a/README.adoc +++ b/README.adoc @@ -2,7 +2,7 @@ = docs-status-codes -This repository contains the AsciiDoc and other sources to build the link:{docs-uri}/status-codes[Neo4j Status Codes]. +This repository contains the AsciiDoc and other sources to build the link:{docs-uri}/status-codes[Status Codes for Errors & Notifications]. [[local-build]] == Installation diff --git a/antora.yml b/antora.yml index b2ae0b3d..eaafdcc9 100644 --- a/antora.yml +++ b/antora.yml @@ -1,5 +1,5 @@ name: status-codes -title: Status Codes +title: Status Codes for Errors & Notifications version: '5' start_page: ROOT:index.adoc nav: @@ -7,6 +7,6 @@ nav: asciidoc: attributes: page-origin-private: false - neo4j-version: '5.25' - neo4j-version-exact: '5.25.1' - neo4j-buildnumber: '5.25' + neo4j-version: '5.26' + neo4j-version-exact: '5.26.0' + neo4j-buildnumber: '5.26' diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 37f18944..5c50bc46 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -1,8 +1,7 @@ * xref:index.adoc[] * xref:errors/index.adoc[] +** xref:errors/gql-errors.adoc[] ** xref:errors/all-errors.adoc[] * xref:notifications/index.adoc[] ** xref:notifications/all-notifications.adoc[] -* xref:changelogs.adoc[] - - +* xref:changelogs.adoc[] \ No newline at end of file diff --git a/modules/ROOT/pages/changelogs.adoc b/modules/ROOT/pages/changelogs.adoc index 8ec14b74..5a83b6d0 100644 --- a/modules/ROOT/pages/changelogs.adoc +++ b/modules/ROOT/pages/changelogs.adoc @@ -1,6 +1,11 @@ :description: This page lists all changes to status codes per Neo4j version. = Changes to status codes per Neo4j version +== Neo4j 5.25 + +Starting from 5.25, the query log includes the GQL error information under the JSON object `errorInfo`. +For more information, see link:https://neo4j.com/docs/operations-manual/current/monitoring/logging/#gql-error-information[Operations Manual -> GQL error information]. + == Neo4j 5.24 **New:** diff --git a/modules/ROOT/pages/errors/all-errors.adoc b/modules/ROOT/pages/errors/all-errors.adoc index 28942cd0..b8fa554a 100644 --- a/modules/ROOT/pages/errors/all-errors.adoc +++ b/modules/ROOT/pages/errors/all-errors.adoc @@ -1,10 +1,10 @@ -:description: The Neo4j error codes for Neo4j version {neo4j-version}. +:description: The error codes for Neo4j 5. [[neo4j-errors]] -= List of all server error codes += List of Neo4j error codes -This page contains lists of all Neo4j errors, grouped by type. +This page lists the current Neo4j error codes, which which are returned along side xref:errors/gql-errors.adoc[GQLSTATUS error codes], grouped by type. == Client errors @@ -13,7 +13,7 @@ This is a complete list of all client errors Neo4j may return, and what they mea [options="header", cols="<1m,<1"] |=== -| Neo4j status code +| Neo4j code | Description | Neo.ClientError.ChangeDataCapture.InvalidIdentifier @@ -279,7 +279,7 @@ This is a complete list of all transient errors Neo4j may return, and what they [options="header", cols="<1m,<1"] |=== -| Neo4j status code +| Neo4j code | Description | Neo.TransientError.ChangeDataCapture.FutureIdentifier @@ -386,7 +386,7 @@ This is a complete list of all database errors Neo4j may return, and what they m [options="header", cols="<1m,<1"] |=== -| Neo4j status code +| Neo4j code | Description | Neo.DatabaseError.ChangeDataCapture.Disabled diff --git a/modules/ROOT/pages/errors/gql-errors.adoc b/modules/ROOT/pages/errors/gql-errors.adoc new file mode 100644 index 00000000..6fd6411b --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors.adoc @@ -0,0 +1,1504 @@ +:description: This section describes the GQLSTATUS errors that Neo4j can return, grouped by category, and an example of when they can occur. + +[[neo4j-gqlstatus-errors]] += List of GQLSTATUS error codes + +//The following page provides an overview of all server errors in Neo4j, along with some scenarios and their possible solutions. +The following page provides an overview of all GQLSTATUS server error codes in Neo4j. +All errors in Neo4j have severity level `ERROR`. + +[WARNING] +==== +Please note that while GQLSTATUS codes remain stable (any changes to them will be breaking), changes to status descriptions associated with these codes are not breaking and may happen at any time. +For this reason, parsing the status descriptions or incorporating them into scripts is not recommended. +==== + +== Connection exceptions + +Connection exceptions occur when the client (e.g. Browser/Bloom/Cypher Shell) is unable to connect to the server for various reasons such as network issues, server-side routing being disabled, or the database being unavailable, etc. + +=== 08000 + +Status description:: error: connection exception + +=== 08007 + +Status description:: error: connection exception - transaction resolution unknown + +=== 08N00 + +Status description:: error: connection exception - unable to connect to database. Unable to connect to database `{ $db }`. Unable to get bolt address of the leader. Check the status of the database. Retrying your request at a later time may succeed. + + +=== 08N01 + +Status description:: error: connection exception - unable to write to database. Unable to write to database `{ $db }` on this server. Server-side routing is disabled. Either connect to the database leader directly or enable server-side routing by setting '{ $cfgSetting }=true'. + +//Possible solutions: +//Either connect to the database directly using the driver or interactively with the `:use `{ $db }` command), or enable server-side routing by setting `dbms.routing.enabled=true` in the configuration. + +=== 08N02 + +Status description:: error: connection exception - unable to connect to database. Unable to connect to database `{ $db }`. Server-side routing is disabled. Either connect to `{ $db }` directly, or enable server-side routing by setting '{ $cfgSetting }=true'. + +Example error description:: error: connection exception - unable to route to database. Unable to connect to database `my_db`. Server-side routing is disabled. Either connect to `my_db` directly, or enable server-side routing by setting 'dbms.routing.enabled=true'. + +//Possible solutions: +//Either connect to the database directly using the driver or interactively with the `:use `{ $db }` command), or enable server-side routing by setting `dbms.routing.enabled=true` in the configuration. + +=== 08N03 + +Status description:: error: connection exception - failed to write to graph. Failed to write to graph `{ $graph }`. Check the defined access mode in both driver and database. + +=== 08N04 + +Status description:: error: unable to route use clause. Routing with `{ $clause }` is not supported in embedded sessions. Connect to the database directly or try running the query using a Neo4j driver or the HTTP API. + +=== 08N05 + +Status description:: error: connection exception - unable to route administration command. Routing administration commands is not supported in embedded sessions. Connect to the system database directly or try running the query using a Neo4j driver or the HTTP API. + +=== 08N06 + +Status description:: error: connection exception - protocol error. General network protocol error. + +=== 08N07 + +Status description:: error: connection exception - not the leader. This member is not the leader. + +//Possible solutions: +//No write operations are allowed directly on this database. Connect to the leader directly or enable server-side routing by setting `dbms.routing.enabled=true` in the configuration. + +=== 08N08 + +Status description:: error: connection exception - database is read only. This database is read only on this server. + +=== 08N09 + +Status description:: error: connection exception - database unavailable. The database `{ $db }` is currently unavailable. Check the database status. Retry your request at a later time. + +=== 08N10 + +Status description:: error: connection exception - invalid server state. Message `{ $msg }` cannot be handled by session in the `{ $boltServerState }` state. + +=== 08N11 + +Status description:: error: connection exception - request error. The request is invalid and could not be processed by the server. See cause for further details. + +=== 08N12 + +Status description:: error: connection exception - failed to parse bookmark. Failed to parse the supplied bookmark. Verify it is correct or check the debug log for more information. + +=== 08N13 + +Status description:: error: connection exception - database not up to requested bookmark. The database `{ $db }` is not up to the requested bookmark `{ $transactionId1 }`. The latest transaction ID is `{ $transactionId2 }`. + +=== 08N14 + +Status description:: error: connection exception - alias chains are not permitted. Unable to provide a routing table for the database identifed by the alias `{ $alias1 }` because the request comes from another alias `{ $alias2 }` and alias chains are not permitted. + +=== 08N15 + +Status description:: error: connection exception - no such routing policy. Policy definition of the routing policy `{ $routingPolicy }` could not be found. Verify that the spelling is correct. + +=== 08N16 + +Status description:: error: connection exception - general driver client error. Remote execution failed with message `{ $msg }`. + +=== 08N17 + +Status description:: error: connection exception - general driver transient error. Remote execution failed with message `{ $msg }`. + +=== 08N18 + +Status description:: error: connection exception - general driver database error. Remote execution failed with message `{ $msg }`. + +== Data exceptions + +Database exceptions occur when a client request contains the wrong format, types, or other unsupported input. +Some examples are data and constraint creation, which conflicts with existing constraints, properties of non-storable type, and spatial and temporal values with invalid components. + +=== 22000 + +Status description:: error: data exception + +=== 22003 + +Status description:: error: data exception - numeric value out of range. The numeric value `{ $value }` is outside the required range. + +=== 22007 + +Status description:: error: data exception - invalid date, time, or datetime format + +=== 22015 + +Status description:: error: data exception - interval field overflow + +=== 22G03 + +Status description:: error: data exception - invalid value type + +=== 22N00 + +Status description:: error: data exception - unsupported value. The provided value is unsupported and cannot be processed. + +=== 22N01 + +Status description:: error: data exception - invalid type. +Expected the value `{ $value }` to be of type `{ $valueTypeList }`, but was of type `{ $valueType }`. + +=== 22N02 + +Status description:: error: data exception - specified negative numeric value. Expected `{ $option }` to be a positive number but found `{ $value }` instead. + +=== 22N03 + +Status description:: error: data exception - specified numeric value out of range. Expected `{ $component }` to be of type `{ $valueType }` and in the range `{ $lower }` to `{ $upper }` but found `{ $value }`. + +=== 22N04 + +Status description:: error: data exception - invalid input value. Invalid input `{ $input }` for `{ $context }`. Expected `{ $inputList }`. + +=== 22N05 + +Status description:: error: data exception - input failed validation. Invalid input `{ $input }` for `{ $context }`. + +=== 22N06 + +Status description:: error: data exception - empty input string. Invalid input. `{ $option }` needs to be specified. + +// Example error message:: 22N06: Invalid input. 'myOption' needs to be specified. + +=== 22N07 + +Status description:: error: data exception - invalid pre-parser option key. Invalid pre-parser option(s): `{ $optionList }`. + +=== 22N08 + +Status description:: error: data exception - invalid pre-parser combination. Invalid pre-parser option, cannot combine `{ $option1 }` with `{ $option2 }`. + +=== 22N09 + +Status description:: error: data exception - conflicting pre-parser combination. Invalid pre-parser option, cannot specify multiple conflicting values for `{ $option }`. + +=== 22N10 + +Status description:: error: data exception - invalid pre-parser option value. Invalid pre-parser option, specified `{ $input }` is not valid for option `{ $option }`. Valid options are: `{ $optionList }`. + +=== 22N11 + +Status description:: error: data exception - invalid argument. Invalid argument: cannot process `{ $input }`. + +=== 22N12 + +Status description:: error: data exception - invalid date, time, or datetime format. Invalid argument: cannot process `{ $input }`. + +=== 22N13 + +Status description:: error: data exception - invalid time zone. Specified time zones must include a date component. + +=== 22N14 + +Status description:: error: data exception - invalid temporal value combination. Cannot select both `{ $temporal }` and `{ $component }`. + +=== 22N15 + +Status description:: error: data exception - invalid temporal component. Cannot read the specified `{ $component }` component from `{ $temporal }`. + +// === 22N16 + +// Status description:: error: data exception - invalid import value. Importing entity values to a graph with a USE clause is not supported. Attempted to import `{ $expr }` to `{ $graph }`. + +// === 22N17 + +// Status description:: error: data exception - invalid date, time, or datetime function field name. Cannot read the specified `{ $component }` component from `{ $temporal }`. + +=== 22N18 + +Status description:: error: data exception - incomplete spatial value. A `{ $crs }` POINT must contain `{ $mapKeyList }`. + +=== 22N19 + +Status description:: error: data exception - invalid spatial value. A `POINT` must contain either 'x' and 'y', or 'latitude' and 'longitude'. + +=== 22N20 + +Status description:: error: data exception - invalid spatial value dimensions. Cannot create POINT with `{ $dim1 }D` coordinate reference system (CRS) and `{ $value }` coordinates. Use the equivalent `{ $dim2 }D` coordinate reference system instead. + +// === 22N21 + +// Status description:: error: data exception - unsupported coordinate reference system. Unsupported coordinate reference system (CRS): `{ $crs }`. + +=== 22N22 + +Status description:: error: data exception - invalid spatial value combination. Cannot specify both coordinate reference system (CRS) and spatial reference identifier (SRID). + +=== 22N23 + +Status description:: error: data exception - invalid latitude value. Cannot create WGS84 POINT with invalid coordinate: `{ $coordinates }`. The valid range for the latitude coordinate is [-90, 90]. + +=== 22N24 + +Status description:: error: data exception - invalid coordinate arguments. Cannot construct a `{ $valueType }` from `{ $coordinates }`. + +=== 22N25 + +Status description:: error: data exception - invalid temporal arguments. Cannot construct a `{ $valueType }` from `{ $temporal }`. + +=== 22N26 + +Status description:: error: data exception - unsupported rounding mode. Unknown rounding mode. Valid values are: `CEILING`, `FLOOR`, `UP`, `DOWN`, `HALF_EVEN`, `HALF_UP`, `HALF_DOWN`, `UNNECESSARY`. + +=== 22N27 + +Status description:: error: data exception - invalid entity type. Invalid input `{ $input }` for `{ $context }`. Expected to be `{ $valueTypeList }`. + +=== 22N28 + +Status description:: error: data exception - overflow error. The result of the operation `{ $operation }` has caused an overflow. + +// === 22N29 + +// Status description:: error: data exception - unsupported coordinate reference system. Unknown coordinate reference system (CRS). + +// === 22N30 + +// Status description:: error: data exception - missing temporal unit. At least one temporal unit must be specified. + +// === 22N31 + +// Status description:: error: data exception - invalid properties in merge pattern. 'MERGE' cannot be used with graph element property values that are null or NaN. + +=== 22N32 + +Status description:: error: data exception - non-deterministic sort expression. 'ORDER BY' expressions must be deterministic. + +=== 22N33 + +Status description:: error: data exception - invalid shortest path expression. Shortest path expressions must contain start and end nodes. Cannot find: `{ $variable }`. + +// === 22N34 + +// Status description:: error: data exception - invalid use of aggregate function. Cannot use the `{ $fun }` function inside an aggregate function. + +=== 22N35 + +Status description:: error: data exception - invalid date format. Cannot parse `{ $input }` as a DATE. Calendar dates need to be specified using the format 'YYYY-MM', while ordinal dates need to be specified using the format 'YYYY-DDD'. + +=== 22N36 + +Status description:: error: data exception - invalid temporal format. Cannot parse `{ $input }` as a `{ $valueType }`. + +=== 22N37 + +Status description:: error: data exception - invalid coercion. Cannot coerce `{ $value }` to `{ $valueType }`. + +=== 22N38 + +Status description:: error: data exception - invalid function argument. Invalid argument to the function `{ $fun }`. + +// === 22N39 + +// Status description:: error: data exception - unsupported property value type. Value `{ $value }` cannot be stored in properties. + +// === 22N40 + +// Status description:: error: data exception - non-assignable temporal component. Cannot assign `{ $component }` of a `{ $valueType }`. + +=== 22N41 + +Status description:: error: data exception - merge node uniqueness constraint violation. The 'MERGE' clause did not find a matching node `{ $variable }` and cannot create a new node due to conflicts with existing uniqueness constraints. + +=== 22N42 + +Status description:: error: data exception - merge relationship uniqueness constraint violation. The 'MERGE' clause did not find a matching relationship `{ $variable }` and cannot create a new relationship due to conflicts with existing uniqueness constraints. + +=== 22N43 + +Status description:: error: data exception - unable to load external resource. Could not load external resource from `{ $url }`. + +=== 22N44 + +Status description:: error: data exception - parallel runtime disabled. Parallel runtime has been disabled, enable it or upgrade to a bigger Aura instance. + +=== 22N46 + +Status description:: error: data exception - unsupported use of parallel runtime. Parallel runtime does not support updating queries or a change in the state of transactions. Use another runtime. + +=== 22N47 + +Status description:: error: data exception - invalid parallel runtime configuration. No workers are configured for the parallel runtime. Set 'server.cypher.parallel.worker_limit' to a larger value. + +// === 22N48 + +// Status description:: error: data exception - unable to use specified runtime. Cannot use the specified runtime `{ $runtime }` due to `{ $cause }`. Use another runtime. + +=== 22N49 + +Status description:: error: data exception - CSV buffer size overflow. Cannot read a CSV field larger than the set buffer size. Ensure the field does not have an unterminated quote, or increase the buffer size via 'dbms.import.csv.buffer_size'. + +=== 22N51 + +Status description:: error: data exception - database or alias does not exist. A [composite] database or alias with the name `{ $db }` does not exist. Verify that the spelling is correct. + +=== 22N52 + +Status description:: error: data exception - invalid combination of PROFILE and EXPLAIN. 'PROFILE' and 'EXPLAIN' cannot be combined. + +=== 22N53 + +Status description:: error: data exception - invalid use of PROFILE. Cannot 'PROFILE' query before results are materialized. + +=== 22N54 + +Status description:: error: data exception - invalid map. Multiple conflicting entries specified for `{ $mapKey }`. + +// === 22N55 + +// Status description:: error: data exception - required key missing from map. Map requires key `{ $mapKey }` but was missing from field `{ $field }`. + +=== 22N56 + +Status description:: error: data exception - protocol message length limit overflow. Protocol message length limit exceeded (limit: `{ $boltMsgLenLimit }`). + +// === 22N57 + +// Status description:: error: data exception - invalid protocol type. Protocol type is invalid. Invalid number of struct components (received `{ $count1 }` but expected `{ $count2 }`). + +// === 22N58 + +// Status description:: error: data exception - invalid spatial component. Cannot read the specified `{ $component }` component from `{ $value }`. + +// === 22N59 + +// Status description:: error: data exception - token does not exist. The `{ $tokenType }` token with id `{ $tokenId }` does not exist. + +// === 22N62 + +// Status description:: error: data exception - relationship type does not exist. The relationship type `{ $relType }` does not exist. + +// === 22N63 + +// Status description:: error: data exception - property key does not exist. The property key `{ $propKey }` does not exist. + +// === 22N64 + +// Status description:: error: data exception - constraint does not exist. The constraint `{ $constrDescrOrName }` does not exist. + +// === 22N65 + +// Status description:: error: data exception - equivalent constraint already exists. An equivalent constraint already exists: `{ $constrDescrOrName }`. + +=== 22N66 + +Status description:: error: data exception - conflicting constraint already exists. A conflicting constraint already exists: `{ $constrDescrOrName }`. + +=== 22N67 + +Status description:: error: data exception - duplicated constraint name. A constraint with the same name already exists: `{ $constr }`. + +// === 22N68 + +// Status description:: error: data exception - dependent constraint managed individually. Dependent constraints cannot be managed individually and must be managed together with its graph type. + +=== 22N69 + +Status description:: error: data exception - index does not exist. The index specified by `{ $idxDescrOrName }` does not exist. + +// === 22N70 + +// Status description:: error: data exception - equivalent index already exists. An equivalent index already exists: `{ $idxDescrOrName }`. + +=== 22N71 + +Status description:: error: data exception - index with the same name already exists. An index with the same name already exists: `{ $idx }`. + +// === 22N72 + +// Status description:: error: data exception - index required by existing constraint. A requested operation can not be performed on the specified index because the index is part of a constraint. + +// === 22N73 + +// Status description:: error: data exception - constraint conflicts with existing index. Constraint conflicts with already existing index `{ $idx }`. + +// === 22N74 + +// Status description:: error: data exception - index conflicts with existing constraint. An index that belongs to the constraint `{ $constr }` contains a conflicting index. + +// === 22N75 + +// Status description:: error: data exception - constraint contains duplicated tokens. The constraint specified by `{ $constrDescrOrName }` includes a label, relationship type, a property key with name `{ $token }` more than once. + +// === 22N76 + +// Status description:: error: data exception - index contains duplicated tokens. The index specified by `{ $idxDescrOrName }` includes a label, relationship type, a property key with name `{ $token }` more than once. + +=== 22N77 + +Status description:: error: data exception - property presence verification failed. `{ $entityType }` (`{ $entityId }`) with `{ $tokenType }` `{ $token }` must have the following properties: `{ $propKeyList }`. + +=== 22N78 + +Status description:: error: data exception - property type verification failed. `{ $entityType }` (`{ $entityId }`) with `{ $tokenType }` `{ $token }` must have the property `$propKey` with value type `{ $valueType }`. + +// === 22N79 + +// Status description:: error: data exception - property uniqueness constraint violated. Property uniqueness constraint violated: `{ $reasons }`. + +=== 22N81 + +Status description:: error: data exception - expression type unsupported here. Invalid input: `{ $exprType }` is not supported in `{ $context }`. + +=== 22N82 + +Status description:: error: data exception - input contains invalid characters. Input `{ $input }` contains invalid characters for `{ $context }`. Special characters may require that the input is quoted using backticks. + +// === 22N83 + +// Status description:: error: data exception - input consists of too many components. Expected name to contain at most `{ $upper }` components separated by '.'. + +=== 22N84 + +Status description:: error: data exception - string too long. Expected the string to be no more than `{ $upper }` characters long. + +=== 22N85 + +Status description:: error: data exception - string too short. Expected the string to be at least `{ $lower }` characters long. + +=== 22N86 + +Status description:: error: data exception - numeric range 0 disallowed. Expected a nonzero number. + +// === 22N87 + +// Status description:: error: data exception - numeric range 0 or greater allowed. Expected a number that is zero or greater. + +=== 22N88 + +Status description:: error: data exception - not a valid CIDR IP. `{ $input }` is not a valid CIDR IP. + +=== 22N89 + +Status description:: error: data exception - new password cannot be the same as the old password. Expected the new password to be different from the old password. + +=== 22N90 + +Status description:: error: data exception - property type unsupported in constraint. `{ $item }` is not supported in property type constraints. + +=== 22N91 + +Status description:: error: data exception - cannot convert alias local to remote or remote to local. Failed to alter the specified database alias `{ $alias }`. Altering remote alias to a local alias or vice versa is not supported. Drop and recreate the alias instead. + +=== 22N92 + +Status description:: error: data exception - missing RETURN. This query requires a RETURN clause. + +=== 22N93 + +Status description:: error: data exception - missing YIELD. A required YIELD clause is missing. + +=== 22N94 + +Status description:: error: data exception - invalid YIELD *. 'YIELD *' is not supported in this context. Explicitly specify which columns to yield. + +=== 22N95 + +Status description:: error: data exception - parsing JSON exception. Invalid JSON input. Please check the format. + +=== 22N96 + +Status description:: error: data exception - mapping JSON exception. Unable to map the JSON input. Please verify the structure. + +=== 22N97 + +Status description:: error: data exception - unexpected struct tag. Unexpected struct tag: `{ $value }`. + +=== 22N98 + +Status description:: error: data exception - wrong first field during deserialization. Unable to deserialize request. Expected first field to be `{ $field }`, but was '{ $value }'. + +=== 22N99 + +Status description:: error: data exception - wrong token during deserialization. Unable to deserialize request. Expected `{ $token }`, found `{ $value }`. + +=== 22NA0 + +Status description:: error: data exception - invalid property based access control rule. Failed to administer property rule. + +// === 22NA1 + +// Status description:: error: data exception - invalid property based access control rule involving non-commutative expressions. The property `{ $propKey }` must appear on the left hand side of the `{ $operation }` operator. + +// === 22NA2 + +// Status description:: error: data exception - invalid property based access control rule involving multiple properties. The expression: `{ $expr }` is not supported. Property rules can only contain one property. + +// === 22NA3 + +// Status description:: error: data exception - invalid property based access control rule involving NaN. 'NaN' is not supported for property-based access control. + +=== 22NA4 + +Status description:: error: data exception - invalid property based access control rule involving comparison with NULL. The property value access rule pattern `{ $pred }` always evaluates to 'NULL'. + +=== 22NA5 + +Status description:: error: data exception - invalid property based access control rule involving IS NULL. The property value access rule pattern `{ $pred }` always evaluates to 'NULL'. Use `IS NULL' instead. + +=== 22NA6 + +Status description:: error: data exception - invalid property based access control rule involving IS NOT NULL. The property value access rule pattern `{ $pred }` always evaluates to 'NULL'. Use 'IS NOT NULL' instead. + +// === 22NA7 + +// Status description:: error: data exception - invalid property based access control rule involving nontrivial predicates. The expression: `{ $expr }` is not supported. Only single, literal-based predicate expressions are allowed for property-based access control. + +=== 22NA8 + +Status description:: error: data exception - parsing JSON failure. Underlying error: `{ $cause }`. + +// === 22NA9 + +// Status description:: error: data exception - unexpected map entry. Invalid input. Unexpected key `{ $key }`, expected keys are `{ $listAllowedKeys }`. + +=== 22NB0 + +Status description:: error: data exception - invalid property based access control rule involving WHERE and IS NULL. The property value access rule pattern `{ $pred }` always evaluates to 'NULL'. Use `WHERE` syntax in combination with `IS NULL` instead. + +=== 22NB1 + +Status description:: error: data exception - type mismatch. Type mismatch: expected to be `{ $valueTypeList }` but was `{ $input }`. + +// === 22NFF + +// Status description:: error: data exception - referent does not exist. The referent of the specified reference does not exist. + + +== Invalid transaction state + +Invalid transaction state errors occur when the transaction is in an invalid state, such as when the transaction is terminated or closed, or when there is a conflict between the transaction state and applied updates. + +=== 25N01 + +Status description:: error: invalid transaction state - invalid combination of statement types. Failed to execute the query `{ $query }` due to conflicting statement types (read query, write query, schema modification, or administration command). To execute queries in the same transaction, they must be either of the same type, or be a combination of schema modifications and read commands. + +=== 25N02 + +Status description:: error: invalid transaction state - unable to complete transaction. Unable to complete transaction. See debug log for details. + +=== 25N03 + +Status description:: error: invalid transaction state - concurrent access violation. Transaction is being used concurrently by another request. + +=== 25N04 + +Status description:: error: invalid transaction state - specified transaction does not exist. +Transaction `{ $transactionId }` does not exist. + +=== 25N05 + +Status description:: error: invalid transaction state - transaction terminated or closed. The transaction has been terminated or closed. + +=== 25N06 + +Status description:: error: invalid transaction state - transaction start failed. Failed to start transaction. See debug log for details. + +// === 25N07 + +// Status description:: error: invalid transaction state - constituent transaction start failed. Failed to start constituent transaction. See debug log for details. + +=== 25N08 + +Status description:: error: invalid transaction state - invalid transaction lease. The lease for the transaction is no longer valid. + +=== 25N09 + +Status description:: error: invalid transaction state - internal transaction failure. The transaction failed due to an internal error. + +=== 25N11 + +Status description:: error: invalid transaction state - conflicting transaction state. There was a conflict detected between the transaction state and applied updates. Please retry the transaction. + +=== 25N12 + +Status description:: error: invalid transaction state - index was dropped. Index `{ $idx }` was dropped in this transaction and cannot be used. + +=== 25N13 + +Status description:: error: invalid transaction state - cannot access entity after removal. A `{ $entityType }` was accessed after being deleted in this transaction. Verify the transaction statements. + +== Invalid transaction termination + +Invalid transaction termination errors occur when the transaction termination fails, such as when the transaction or constituent transaction fails to commit, or when the transaction termination fails to apply or append the transaction. + +=== 2DN01 + +Status description:: error: invalid transaction termination - commit failed. Failed to commit transaction. See debug log for details. + +=== 2DN02 + +Status description:: error: invalid transaction termination - constituent commit failed. Failed to commit constituent transaction. See debug log for details. + +=== 2DN03 + +Status description:: error: invalid transaction termination - transaction termination failed. Failed to terminate transaction. See debug log for details. + +=== 2DN04 + +Status description:: error: invalid transaction termination - constituent transaction termination failed. Failed to terminate constituent transaction. See debug log for details. + +=== 2DN05 + +Status description:: error: invalid transaction termination - failed to apply transaction. There was an error on applying the transaction. See logs for more information. + +=== 2DN06 + +Status description:: error: invalid transaction termination - failed to append transaction. There was an error on appending the transaction. See logs for more information. + +=== 2DN07 + +Status description:: error: invalid transaction termination - inner transactions still open. Unable to commit transaction because it still have non-closed inner transactions. + +[[transaction-rollback]] +== Transaction rollback + +Transaction rollback errors occur when there is a failure in a transaction or a constituent transaction rollback. + +=== 40000 + +Status description:: error: transaction rollback + +=== 40003 + +Status description:: error: transaction rollback - statement completion unknown + +=== 40N01 + +Status description:: error: transaction rollback - rollback failed. Failed to rollback transaction. See debug log for details. + +=== 40N02 + +Status description:: error: transaction rollback - constituent rollback failed. Failed to rollback constituent transaction. See debug log for details. + +[[syntax-error-access-rule-violation]] +== Syntax error or access rule violation + +Syntax error or access rule violation errors occur when a Cypher query contains invalid syntax or when a client request violates the access rules, such as when a query tries to access a database without enough privileges, etc. + +=== 42000 + +Status description:: error: syntax error or access rule violation + +=== 42001 + +Status description:: error: syntax error or access rule violation - invalid syntax + +=== 42002 + +Status description:: error: syntax error or access rule violation - invalid reference + +// === 42004 + +// Status description:: error: syntax error or access rule violation - use of visually confusable identifiers + +=== 42006 + +Status description:: error: syntax error or access rule violation - number of edge labels below supported minimum + +=== 42007 + +Status description:: error: syntax error or access rule violation - number of edge labels exceeds supported maximum + +=== 42008 + +Status description:: error: syntax error or access rule violation - number of edge properties exceeds supported maximum + +=== 42009 + +Status description:: error: syntax error or access rule violation - number of node labels below supported minimum + +=== 42010 + +Status description:: error: syntax error or access rule violation - number of node labels exceeds supported maximum + +=== 42011 + +Status description:: error: syntax error or access rule violation - number of node properties exceeds supported maximum + +=== 42012 + +Status description:: error: syntax error or access rule violation - number of node type key labels below supported minimum + +=== 42013 + +Status description:: error: syntax error or access rule violation - number of node type key labels exceeds supported maximum + +=== 42014 + +Status description:: error: syntax error or access rule violation - number of edge type key labels below supported minimum + +=== 42015 + +Status description:: error: syntax error or access rule violation - number of edge type key labels exceeds supported maximum + +=== 42I00 + +Status description:: error: syntax error or access rule violation - invalid case expression. 'CASE' expressions must have the same number of 'WHEN' and 'THEN' operands. + +=== 42I01 + +Status description:: error: syntax error or access rule violation - invalid `FOREACH`. Invalid use of `{ $clause }` inside 'FOREACH'. + +=== 42I02 + +Status description:: error: syntax error or access rule violation - invalid comment. Failed to parse comment. A comment starting with '/\*' must also have a closing '*/'. + +=== 42I05 + +Status description:: error: syntax error or access rule violation - invalid FIELDTERMINATOR. The FIELDTERMINATOR specified for LOAD CSV can only be one character wide. The FIELDTERMINATOR specified for LOAD CSV can only be one character wide. + +=== 42I06 + +Status description:: error: syntax error or access rule violation - invalid input. Invalid input `{ $input }`, expected: `{ $valueList }`. + +=== 42I13 + +Status description:: error: syntax error or access rule violation - invalid number of procedure or function arguments. The procedure or function call does not provide the required number of arguments; expected `{ $count1 }` but got `{ $count2 }`. The procedure or function `{ $procFun }` has the signature: `{ $sig }`. + +=== 42I18 + +Status description:: error: syntax error or access rule violation - invalid reference to implicitly grouped expressions. The aggregation column contains implicit grouping expressions referenced by the variables `{ $varList }`. Implicit grouping expressions are variables not explicitly declared as grouping keys. + + +=== 42I20 + +Status description:: error: syntax error or access rule violation - invalid symbol in expression. Label expressions and relationship type expressions cannot contain `{ $input }`. To express a label disjunction use `{ $labelExpr }` instead. + +=== 42I25 + +Status description:: error: syntax error or access rule violation - invalid use of `CALL IN TRANSACTIONS`. 'CALL { ... } IN TRANSACTIONS' is not supported after a write clause. + +=== 42I29 + +Status description:: error: syntax error or access rule violation - invalid use of `IS`. The `IS` keyword cannot be used together with multiple labels in `{ $input }`. Rewrite the expression as `{ $replacement }`. + +=== 42I31 + +Status description:: error: syntax error or access rule violation - invalid use of `MATCH`. 'MATCH ...' cannot directly follow an 'OPTIONAL MATCH ...'. Use a `WITH` clause between them. + + +=== 42I37 + +Status description:: error: syntax error or access rule violation - invalid use of `RETURN *`. 'RETURN *' is not allowed when there are no variables in scope. + +=== 42I38 + +Status description:: error: syntax error or access rule violation - invalid use of `RETURN`. 'RETURN ...' can only be used at the end of a query or subquery. + +=== 42I40 + +Status description:: error: syntax error or access rule violation - invalid use of `UNION` and `UNION ALL`. `UNION` and `UNION ALL` cannot be combined. + +=== 42I45 + +Status description:: error: syntax error or access rule violation - invalid use of multiple path patterns. Multiple path patterns cannot be used in the same clause in combination with a selective path selector. `{ $action }` + +=== 42I47 + +Status description:: error: syntax error or access rule violation - parser error. Parser Error: `{ $msg }`. + +=== 42I48 + +Status description:: error: syntax error or access rule violation - invalid use of a subquery in MERGE. Subqueries are not allowed in a MERGE clause. + +=== 42I50 + +Status description:: error: syntax error or access rule violation - token name too long. Invalid input `{ $input }..`. A `{ $tokenType }` name cannot be longer than `{ $maxTokenLength }`. + +=== 42I51 + +Status description:: info: invalid call signature. The procedure or function `{ $procFun }` must have the signature: `{ $sig }`. + +=== 42N00 + +Status description:: error: syntax error or access rule violation - no such database. The database `{ $db }` was not found. Verify that the spelling is correct. + +=== 42N01 + +Status description:: error: syntax error or access rule violation - no such constituent graph exists in composite database. The constituent graph `{ $graph }` was not found in the in composite database `{ $db }`. Verify that the spelling is correct. + +=== 42N02 + +Status description:: error: syntax error or access rule violation - writing in read access mode. Writing in read access mode not allowed. + +=== 42N03 + +Status description:: error: syntax error or access rule violation - writing to multiple graphs. Writing to multiple graphs in the same transaction is not allowed. Use `CALL IN TRANSACTION` or create separate transactions in your application. + +=== 42N04 + +Status description:: error: syntax error or access rule violation - unsupported access of composite database. Failed to access database identified by `{ $db1 }` while connected to session database `{ $db2 }`. Connect to `{ $db3 }` directly. + +=== 42N05 + +Status description:: error: syntax error or access rule violation - unsupported access of standard database. Failed to access database identified by `{ $db1 }` while connected to composite session database `{ $db2 }`. Connect to `{ $db3 }` directly or create an alias in the composite database. + +=== 42N06 + +Status description:: error: syntax error or access rule violation - unsupported action on composite database. `{ $action }` is not supported on composite databases. + +=== 42N07 + +Status description:: error: syntax error or access rule violation - variable shadowing. The variable `{ $variable }` is shadowing a variable with the same name from the outer scope and needs to be renamed. + +=== 42N08 + +Status description:: error: syntax error or access rule violation - no such procedure or function. The procedure or function `{ $procFun }` was not registered for this database instance. Verify that the spelling is correct. + +=== 42N09 + +Status description:: error: syntax error or access rule violation - no such user. A user with the name `{ $user }` was not found. Verify that the spelling is correct. + +=== 42N10 + +Status description:: error: syntax error or access rule violation - no such role. A role with the name `{ $role }` was not found. Verify that the spelling is correct. + +=== 42N11 + +Status description:: error: syntax error or access rule violation - database or alias already exists. A `[composite]` database or alias with the name `{ $db }` already exists. + +=== 42N12 + +Status description:: error: syntax error or access rule violation - user already exists. A user with the name `{ $user }` already exists. + +=== 42N13 + +Status description:: error: syntax error or access rule violation - role already exists. A role with the name `{ $role }` already exists. + +=== 42N14 + +Status description:: error: syntax error or access rule violation - invalid use of command. `{ $clause }` cannot be used together with `{ $cmd }`. + +=== 42N15 + +Status description:: error: syntax error or access rule violation - invalid use of reserved keyword. `{ $syntax }` is a reserved keyword and cannot be used in this place. + +=== 42N16 + +Status description:: error: syntax error or access rule violation - unsupported index or constraint. Only single property `{ $idxType }` are supported. + +=== 42N17 + +Status description:: error: syntax error or access rule violation - unsupported request. `{ $input }` is not allowed on the system database. + +=== 42N19 + +Status description:: error: syntax error or access rule violation - duplicate clause. Duplicate `{ $syntax }` clause. + +=== 42N20 + +Status description:: error: syntax error or access rule violation - empty list range operator. The list range operator '[ ]' cannot be empty. + + +=== 42N21 + +Status description:: error: syntax error or access rule violation - unaliased return item. Expression in `{ $clause }` must be aliased (use AS). + + +=== 42N22 + +Status description:: error: syntax error or access rule violation - single return column required. A `COLLECT` subquery must end with a single return column. + +=== 42N24 + +Status description:: error: syntax error or access rule violation - missing `WITH`. A `WITH` clause is required between `{ $input1 }` and `{ $input2 }`. + + +=== 42N29 + +Status description:: error: syntax error or access rule violation - unbound variables in pattern expression. Pattern expressions are not allowed to introduce new variables: `{ $var }`. + +=== 42N31 + +Status description:: error: syntax error or access rule violation - specified number out of range. Expected `{ $component }` to be `{ $valueType }` in the range `{ $lower }` to `{ $upper }` but found `{ $value }`. + +=== 42N39 + +Status description:: error: syntax error or access rule violation - incompatible return columns. All subqueries in a `UNION` clause must have the same return column names. + +=== 42N40 + +Status description:: error: syntax error or access rule violation - single relationship pattern required. The `{ $fun }` function must contain one relationship pattern. + +=== 42N42 + +Status description:: error: syntax error or access rule violation - unsupported sub-path binding. Sub-path assignment is not supported. + +=== 42N45 + +Status description:: error: syntax error or access rule violation - unexpected end of input. Unexpected end of input, expected 'CYPHER', 'EXPLAIN', 'PROFILE' or a query. + +=== 42N49 + +Status description:: error: syntax error or access rule violation - unsupported normal form. Unknown Normal Form: `{ $input }`. + +=== 42N51 + +Status description:: error: syntax error or access rule violation - invalid parameter. Invalid parameter `{ $param }`. + +=== 42N57 + +Status description:: error: syntax error or access rule violation - invalid use of data-modifications in expressions. `{ $expr }` cannot contain any updating clauses. + +=== 42N70 + +Status description:: error: syntax error or access rule violation - function without required WHERE clause. The function `{ $fun }` requires a WHERE clause. + +=== 42N71 + +Status description:: error: syntax error or access rule violation - incomplete query. A query must conclude with a `RETURN` clause, a `FINISH` clause, an update clause, a unit subquery call, or a procedure call without a `YIELD` clause. + +=== 42N73 + +Status description:: error: syntax error or access rule violation - invalid placement of USE clause. The USE clause must be the first clause of a query or an operand to '... UNION ...' . In a CALL sub-query, it can also be the second clause if the first clause is an importing WITH. + +=== 42N74 + +Status description:: error: syntax error or access rule violation - invalid nested USE clause. Failed to access `{ $db1 }` and `{ $db2 }`. Child USE clauses must target the same graph as their parent query. Run in separate (sub)queries instead. + +=== 42N75 + +Status description:: error: syntax error or access rule violation - invalid use of graph function. A call to the graph function `{ $fun }` is only allowed as the top-level argument of a `USE` clause. + +=== 42N76 + +Status description:: error: syntax error or access rule violation - unfulfillable hints. The hint(s) `{ $hintAndedList }` cannot be fulfilled. + +=== 42N77 + +Status description:: error: syntax error or access rule violation - missing hint predicate. The hint `{ $hint }` cannot be fulfilled. The query does not contain a compatible predicate for `{ $entityType }` on `{ $variable }`. + +=== 42N78 + +Status description:: error: syntax error or access rule violation - variable already bound. Node `{ $var }` has already been bound and cannot be modified by the `{ $clause }` clause. + +=== 42N83 + +Status description:: error: syntax error or access rule violation - impersonation disallowed while password change required. Cannot impersonate a user while password change required. + +=== 42N84 + +Status description:: error: syntax error or access rule violation - `TERMINATE TRANSACTION` misses `YIELD` clause. `WHERE` clause without `YIELD` clause. Use 'TERMINATE TRANSACTION ... YIELD ... WHERE ...'. + +=== 42N85 + +Status description:: error: syntax error or access rule violation - cannot specify both allowed and denied databases. Allowed and denied database options are mutually exclusive. + +=== 42N86 + +Status description:: error: syntax error or access rule violation - wildcard in parameter. `{ $syntax }` failed. Parameterized database and graph names do not support wildcards. + +=== 42N88 + +Status description:: error: syntax error or access rule violation - cannot grant privilege. Permission cannot be granted for 'REMOVE IMMUTABLE PRIVILEGE'. + +=== 42N89 + +Status description:: error: syntax error or access rule violation - invalid driver settings map. Failed evaluating the given driver settings. `{ $cause }` + +=== 42N90 + +Status description:: error: syntax error or access rule violation - cannot alter immutable composite database. Composite databases cannot be altered (database: `{ $db }`). + +=== 42N97 + +Status description:: error: syntax error or access rule violation - missing mandatory auth clause. Clause `{ $clause }` is mandatory for auth provider `{ $auth }`. + + +=== 42N98 + +Status description:: error: syntax error or access rule violation - cannot modify own user. Cannot modify the user record of the current user. + +=== 42N99 + +Status description:: error: syntax error or access rule violation - cannot delete own user. Cannot delete the user record of the current user. + +=== 42NA5 + +Status description:: info: accessing multiple graphs only supported on composite databases. Accessing multiple graphs in the same query is only supported on composite databases. Connect to a composite database with the desired constituents. + +=== 42NA6 + +Status description:: info: invalid alias target. Aliases are not allowed to target composite databases. + +=== 42NA7 + +Status description:: info: referenced database not found. No database is corresponding to `{ $db }`. Verify that the elementId is correct. + +=== 42NFD + +Status description:: error: syntax error or access rule violation - credentials expired. Permission denied. The credentials you provided were valid, but must be changed before you can use this instance. + +=== 42NFE + +Status description:: error: syntax error or access rule violation - auth info expired. Authentication and/or authorization info expired. + +=== 42NFF + +Status description:: error: syntax error or access rule violation - permission/access denied. Access denied, see the security logs for details. + + +== General processing exception + +General processing exceptions occur when there is a general processing error, such as an internal error, deadlock, execution failure, invalid server state transition, constraint creation or drop failure, etc. + +=== 50N00 + +Status description:: error: general processing exception - internal error. Internal exception raised `{ $msgTitle }`: `{ $msg }` + +=== 50N05 + +Status description:: error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details. + +=== 50N06 + +Status description:: error: general processing exception - remote execution client error. Remote execution failed. See cause for more details. + +=== 50N07 + +Status description:: error: general processing exception - execution failed. Execution failed. See cause and debug log for details. + +=== 50N09 + +Status description:: error: general processing exception - invalid server state transition. The server transitioned into a server state that is not valid in the current context: `{ $boltServerState }`. + +=== 50N11 + +Status description:: error: general processing exception - constraint creation failed. Unable to create `{ $constrDescrOrName }`. + +=== 50N12 + +Status description:: error: general processing exception - constraint drop failed. Unable to drop `{ $constrDescrOrName }`. + +=== 50N16 + +Status description:: error: general processing exception - remote execution transient error. Remote execution failed. See cause for more details. + +=== 50N17 + +Status description:: error: general processing exception - remote execution database error. Remote execution failed. See cause for more details. + +=== 50N42 + +Status description:: error: general processing exception - unexpected error. Unexpected error has occurred. See debug log for details. + +[NOTE] +==== +50N42 is the default GQLSTATUS code for exceptions without a GQL object. +For more information, see link:https://neo4j.com/docs/operations-manual/current/monitoring/logging/#_use_json_format_for_the_query_log[Operations Manual -> Use JSON format for the query log]. +==== + +== System configuration or operation exception + +System configuration or operation exception errors occur when there is an error in the system configuration or operation, such as procedure registration failure, a missing class field annotation, an unsupported injectable component type, duplicate field names, invalid map key type, etc. + +=== 51N00 + +Status description:: error: system configuration or operation exception - procedure registration error. Failed to register procedure/function. + + +=== 51N01 + +Status description:: error: system configuration or operation exception - class field annotation should be public, non-final, and non-static. The field `{ $procField }` in the class `{ $procClass }` is annotated as a '@Context' field, but it is declared as static. '@Context' fields must be public, non-final and non-static. + +=== 51N02 + +Status description:: error: system configuration or operation exception - unsupported injectable component type. Unable to set up injection for procedure `{ $procClass }`. The field `{ $procField }` has type `{ $procFieldType }` which is not a supported injectable component. + + +=== 51N03 + +Status description:: error: system configuration or operation exception - unable to access field. Unable to set up injection for `{ $procClass }`, failed to access field `{ $procField }`. + + +=== 51N04 + +Status description:: error: system configuration or operation exception - missing class field annotation. The field `{ $procField }` on `{ $procClass }` must be annotated as a '@Context' field in order to store its state. + + +=== 51N05 + +Status description:: error: system configuration or operation exception - class field should be public and non-final. The field `{ $procField }` on `{ $procClass }` must be declared non-final and public. + + +=== 51N06 + +Status description:: error: system configuration or operation exception - missing argument name. The argument at position `{ $pos }` in `{ $procMethod }` requires a '@Name' annotation and a non-empty name. + + +=== 51N07 + +Status description:: error: system configuration or operation exception - invalid ordering of default arguments. The `{ $procFun }` contains a non-default argument after a default argument. Non-default arguments are not allowed to be positioned after default arguments. + + +=== 51N08 + +Status description:: error: system configuration or operation exception - exactly one @UserAggregationResult method and one @UserAggregationUpdate method required. The class `{ $procClass }` must contain exactly one '@UserAggregationResult' method and exactly one '@UserAggregationUpdate' method. + + +=== 51N09 + +Status description:: error: system configuration or operation exception - @UserAggregationUpdate method must be public and void. The '@UserAggregationUpdate' method `{ $procMethod }` of `{ $procClass }` must be public and have the return type 'void'. + + +=== 51N10 + +Status description:: error: system configuration or operation exception - aggregation method not public. The method `{ $procMethod }` of `{ $procClass }` must be public. + + +=== 51N11 + +Status description:: error: system configuration or operation exception - class not public. The class `{ $procClass }` must be public. + + +=== 51N12 + +Status description:: error: system configuration or operation exception - class not void. The procedure `{ $proc }` has zero output fields and must be defined as void. + + +=== 51N13 + +Status description:: error: system configuration or operation exception - procedure or function name already in use. Unable to register the procedure or function `{ $procFun }` because the name is already in use. + + +=== 51N14 + +Status description:: error: system configuration or operation exception - duplicate field name. +The procedure `{ $proc }` has a duplicate `{ $procFieldType }` field, `{ $procField }`. + +=== 51N15 + +Status description:: error: system configuration or operation exception - invalid map key type. Type mismatch for map key. Required 'STRING', but found `{ $valueType }`. + + +=== 51N16 + +Status description:: error: system configuration or operation exception - invalid default value type. Type mismatch for the default value. Required `{ $valueType }`, but found `{ $input }`. + + +=== 51N17 + +Status description:: error: system configuration or operation exception - invalid procedure or function name. Procedures and functions cannot be defined in the root namespace, or use a reserved namespace. Use the package name instead (e.g., org.example.com.`{ $procFun })`. + +=== 51N18 + +Status description:: error: system configuration or operation exception - invalid method return type. The method `{ $procMethod }` has an invalid return type. Procedures must return a stream of records, where each record is of a defined concrete class. + + +=== 51N20 + +Status description:: error: system configuration or operation exception - cannot inject field. The field `{ $procField }` is not injectable. Ensure the field is marked as public and non-final. + +=== 51N21 + +Status description:: error: system configuration or operation exception - procedure registry is busy. The procedure registration failed because the procedure registry was busy. Try again. + +=== 51N22 + +Status description:: error: system configuration or operation exception - exhaustive shortest path search disabled. Finding the shortest path for the given pattern requires an exhaustive search. To enable exhaustive searches, set 'cypher.forbid_exhaustive_shortestpath' to false. + + +=== 51N23 + +Status description:: error: system configuration or operation exception - cyclic shortest path search disabled. Cannot find the shortest path when the start and end nodes are the same. To enable this behavior, set 'dbms.cypher.forbid_shortestpath_common_nodes' to false. + + +=== 51N24 + +Status description:: error: system configuration or operation exception - insufficient resources for plan search. Could not find a query plan within given time and space limits. + + +=== 51N27 + +Status description:: error: system configuration or operation exception - not supported in this edition. `{ $item }` is not supported in `{ $edition }`. + + +=== 51N29 + +Status description:: error: system configuration or operation exception - not supported by this server. The command `{ $cmd }` must be executed on the current 'LEADER' server. + + +=== 51N30 + +Status description:: error: system configuration or operation exception - not supported with this configuration. `{ $item }` is not supported in `{ $context }`. + + +=== 51N32 + +Status description:: error: system configuration or operation exception - server panic. Server is in panic. + + +=== 51N33 + +Status description:: error: system configuration or operation exception - replication error. This member failed to replicate transaction, try again. + + +=== 51N34 + +Status description:: error: system configuration or operation exception - write transaction failed due to leader change. Failed to write to the database due to a cluster leader change. Retrying your request at a later time may succeed. + + +=== 51N35 + +Status description:: error: system configuration or operation exception - database location changed. The location of `{ $db }` has changed while the transaction was running. + +=== 51N36 + +Status description:: error: system configuration or operation exception - out of memory. There is not enough memory to perform the current task. + +=== 51N37 + +Status description:: error: system configuration or operation exception - stack overflow. There is not enough stack size to perform the current task. + +=== 51N38 + +Status description:: error: system configuration or operation exception - failed to acquire execution thread. There are insufficient threads available for executing the current task. + +=== 51N39 + +Status description:: error: system configuration or operation exception - raft log corrupted. Expected set of files not found on disk. Please restore from backup. + + +=== 51N40 + +Status description:: error: system configuration or operation exception - unable to start database. Database `{ $db }` failed to start. Try restarting it. + + +=== 51N41 + +Status description:: error: system configuration or operation exception - admin operation failed. Server or database admin operation not possible. + + +=== 51N43 + +Status description:: error: system configuration or operation exception - cannot deallocate servers. Cannot deallocate server(s) `{ $serverList }`. + + +=== 51N44 + +Status description:: error: system configuration or operation exception - cannot drop server. Cannot drop server `{ $server }`. + + +=== 51N45 + +Status description:: error: system configuration or operation exception - cannot cordon server. Cannot cordon server `{ $server }`. + + +=== 51N46 + +Status description:: error: system configuration or operation exception - cannot alter server. Cannot alter server `{ $server }`. + + +=== 51N47 + +Status description:: error: system configuration or operation exception - cannot rename server. Cannot rename server `{ $server }`. + + +=== 51N48 + +Status description:: error: system configuration or operation exception - cannot enable server. Cannot enable server `{ $server }`. + + +=== 51N49 + +Status description:: error: system configuration or operation exception - cannot alter database. Cannot alter database `{ $db }`. + + +=== 51N50 + +Status description:: error: system configuration or operation exception - cannot recreate database. Cannot recreate database `{ $db }`. + + +=== 51N51 + +Status description:: error: system configuration or operation exception - cannot create database. Cannot create database `{ $db }`. + + +=== 51N52 + +Status description:: error: system configuration or operation exception - number of primaries out of range. Cannot alter database topology. Number of primaries `{ $count }` needs to be at least 1 and may not exceed `{ $upper }`. + + +=== 51N53 + +Status description:: error: system configuration or operation exception - number of secondaries out of range. Cannot alter database topology. Number of secondaries `{ $count }` needs to be at least 0 and may not exceed `{ $upper }`. + +=== 51N54 + +Status description:: error: system configuration or operation exception - cannot reallocate. Failed to calculate reallocation for databases. { $msg } + + +=== 51N55 + +Status description:: error: system configuration or operation exception - cannot create additional database. Failed to create the database `{ $db }`. The limit of databases is reached. Either increase the limit using the config setting `{ $cfgSetting }` or drop a database. + +=== 51N56 + +Status description:: error: system configuration or operation exception - topology out of range. The number of `{ $serverType }` seeding servers `{ $count1 }` is larger than the desired number of `{ $allocType }` allocations `{ $count2 }`. + + +=== 51N57 + +Status description:: error: system configuration or operation exception - generic topology modification error. Unexpected error while picking allocations. { $msg } + +=== 51N59 + +Status description:: error: system configuration or operation exception - internal resource exhaustion. The DBMS is unable to handle the request, please retry later or contact the system operator. More information is present in the logs. + +=== 51N60 + +Status description:: error: system configuration or operation exception - unable to check enterprise license acceptance. The DBMS is unable to determine the enterprise license acceptance status. + + +=== 51N63 + +Status description:: error: system configuration or operation exception - index is still populating. Index is not ready yet. Wait until it finishes populating and retry the transaction. + + +=== 51N64 + +Status description:: error: system configuration or operation exception - index dropped while sampling. The index dropped while sampling. + + +=== 51N65 + +Status description:: error: system configuration or operation exception - vector index dimensionality mismatch. Vector index `{ $idx }` has a dimensionality of `{ $dim1 }`, but indexed vectors have `{ $dim2 }`. + + +=== 51N66 + +Status description:: error: system configuration or operation exception - resource exhaustion. Insufficient resources to complete the request. + +=== 51N68 + +Status description:: error: system configuration or operation exception - CDC is disabled for this database. Change Data Capture is not currently enabled for this database. + +=== 51N69 + +Status description:: error: system configuration or operation exception - system database is immutable. It is not possible to perform `{ $operation }` on the system database. + +=== 51N70 + +Status description:: error: system configuration or operation exception - bolt is not enabled. Cannot get routing table for `{ $db }` because Bolt is not enabled. Please update your configuration such that 'server.bolt.enabled' is set to true. + +=== 51N71 + +Status description:: error: system configuration or operation exception - unsupported operation of a sharded database. Feature: `{ $feat }` is not available in a sharded database. + +== Procedure exception + +Procedure exceptions occur when there is an error in executing a procedure, such as when the procedure execution fails due to a client error, when the procedure cannot be invoked on a primary, when the number of arguments to checkConnectivity is invalid, etc. + +=== 52N02 + +Status description:: error: procedure exception - procedure execution client error. Execution of the procedure `{ $proc }` failed due to a client error. + +=== 52N03 + +Status description:: error: procedure exception - invalid procedure execution mode. Execution of the procedure `{ $proc }` failed due to an invalid specified execution mode `{ $procExeMode }`. + +=== 52N05 + +Status description:: error: procedure exception - must invoke procedure on secondary. Cannot invoke procedure on this member because it is not a secondary for the database `{ $db }`. + +=== 52N06 + +Status description:: error: procedure exception - invalid number of arguments to checkConnectivity. Unexpected number of arguments (expected 0-2 but received `{ $count }`). + +=== 52N07 + +Status description:: error: procedure exception - invalid port argument to checkConnectivity. Unrecognised port name `{ $port }` (valid values are: `{ $portList }`. + +=== 52N08 + +Status description:: error: procedure exception - invalid server id argument to checkConnectivity. Unable to parse server id `{ $server }`. + +=== 52N09 + +Status description:: error: procedure exception - procedure execution database error. Execution of the procedure `{ $proc }` failed due to a database error. + +=== 52N10 + +Status description:: error: procedure exception - invalid address key. An address key is included in the query string provided to the GetRoutingTableProcedure, but its value could not be parsed. + +=== 52N11 + +Status description:: error: procedure exception - generic topology procedure error. An unexpected error has occurred. Please refer to the server's debug log for more information. + +=== 52N12 + +Status description:: error: procedure exception - cannot change default database. The previous default database `{ $db }` is still running. + +=== 52N13 + +Status description:: error: procedure exception - new default database does not exist. New default database `{ $db }` does not exist. + +=== 52N14 + +Status description:: error: procedure exception - system cannot be default database. System database cannot be set as default. + +=== 52N16 + +Status description:: error: procedure exception - invalid procedure argument list. Invalid arguments to procedure. + +=== 52N17 + +Status description:: error: procedure exception - quarantine change failed. Setting/removing the quarantine marker failed. + +=== 52N18 + +Status description:: error: procedure exception - too many seeders. The number of seeding servers `{ $countSeeders }` is larger than the defined number of allocations `{ $countAllocs }`. + +=== 52N19 + +Status description:: error: procedure exception - no such seeder. The specified seeding server with id `{ $server }` was not found. Verify that the spelling is correct. + + +=== 52N23 + +Status description:: error: procedure exception - non-reloadable namespace. The following namespaces are not reloadable: `{ $namespaceList }` + +=== 52N25 + +Status description:: error: procedure exception - JMX error. JMX error while accessing `{ $param }`. See logs for more information. + +=== 52N29 + +Status description:: error: procedure exception - outdated change identifier. Given ChangeIdentifier describes a transaction that occurred before any enrichment records exist. + +=== 52N30 + +Status description:: error: procedure exception - future change identifier. Given ChangeIdentifier describes a transaction that hasn't yet occurred. + +=== 52N31 + +Status description:: error: procedure exception - wrong database. Change identifier `{ $param }` does not belong to this database. + +=== 52N32 + +Status description:: error: procedure exception - invalid sequence number. Change identifier `{ $param1 }` has an invalid sequence number `{ $param2 }`. + +=== 52N33 + +Status description:: error: procedure exception - procedure invocation failed. Failed to invoke procedure/function `{ $sig }` caused by: `{ $msg }`. + +=== 52N34 + +Status description:: error: procedure exception - procedure sandboxed. `{ $sig }` is unavailable because it is sandboxed. Sandboxing is controlled by the dbms.security.procedures.unrestricted setting. Only un-restrict procedures you can trust with access to database internals. + +=== 52N35 + +Status description:: error: procedure exception - procedure compilation failed. Failed to compile procedure/function defined in `{ $procClass }`: `{ $msg }` + + + diff --git a/modules/ROOT/pages/errors/index.adoc b/modules/ROOT/pages/errors/index.adoc index 4d6e4637..8d559c68 100644 --- a/modules/ROOT/pages/errors/index.adoc +++ b/modules/ROOT/pages/errors/index.adoc @@ -1,21 +1,254 @@ -:description: The Neo4j error codes for Neo4j version {neo4j-version}. - -[[error-codes]] +:description: This page describes the structure of the error objects, the error codes, and how to interpret them. +[[neo4j-errors]] = Server errors -Error codes are Neo4j status codes returned by the server when the execution of a query fails. -They always have the severity level `ERROR`. -Errors are grouped based on the type of the error code: +Neo4j returns a server error to indicate that the outcome of a Cypher query or command execution is unsuccessful. +The driver receives these errors and sends them to the Neo4j tools (e.g. Browser, Bloom, Cypher Shell) or the user application, which display them to the user. + +Starting from version 5.26, the Neo4j error codes have an additional GQL-status object along with the Neo4j exception that provides information about the status of a Cypher query or command execution in compliance with the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard]. +This additional GQL-status object is also displayed in the query log from Neo4j 5.25 onwards. +For more information, see link:https://neo4j.com/docs/operations-manual/current/monitoring/logging/#gql-error-information[Operations Manual -> GQL error information]. + +[NOTE] +==== +The default GQLSTATUS code 50N42 is returned when an exception does not have a GQL-status object. +Starting from Neo4j 5.25, we started adding GQL objects to exceptions. +Therefore, you can expect many 50N42 codes during this transition period. +However, it is important not to rely on this default code, as future Neo4j versions might change it by adding an appropriate GQL object to the exception. +Additionally, GQL codes for external procedures are not yet stable. +==== + +This page describes the GQL-status and the Neo4j-status object frameworks for errors, their structure, the objects they provide for errors, and how to interpret them. +It also explains the error internals and the server-driver compatibility for both the GQLSTATUS and errors. + +[role=label--version-5.25] +[[gqlstatus-error-object]] +== GQL-status error object + +In the GQL-status object framework, when a user executes a query to the server, it always produces a result known as the _execution outcome_. +If an error occurs during execution, the outcome is recorded as an exception condition, indicating a failed outcome with no result. +The execution outcome for errors is represented as a list of GQL-status objects with a failed outcome, which are organized according to the following precedence rules: + +. Every exception that results in a transaction rollback takes precedence over other exceptions. +. Every exception takes precedence over any completion condition. +For completion conditions, see the xref:notifications/index.adoc#gqlstatus-notification-object[GQL-status notification object]. + +The GQL-status object also includes Neo4j-specific information, such as severity level and error classification. + +Each GQL-status object consists of the following fields: + +.GQLSTATUS error object +[cols="<1s,<4"] +|=== +|GQLSTATUS code +a| A 5-character string that is the concatenation of a 2-character class code followed by a 3-character subclass code, which identifies the condition of the error. +|StatusDescription +a| A human-readable description of the GQLSTATUS, which consists of a condition, a subcondition, and an optional additional text about the condition. +The format is `error: condition - subcondition. AdditionalInfo`. +The condition and subcondition are textual representations of the class and subclass codes, respectively. +The subcondition for the subclass 000 is empty. +| DiagnosticRecord +a| Extra information about the status, given as key-value pairs, both on the server and driver side. +To retrieve the full diagnostic record, you can use the `diagnosticRecord()` on the server side or the corresponding method on the driver sides. +Additional helper methods are exposed for some useful fields. +[cols="<1s,<4"] +!=== +! Field ! Description +! `OPERATION` ! The operation that the error is related to. Always defaults to empty. +! `OPERATION_CODE` ! The operation code that the error is related to. Always defaults to `0`. +! `CURRENT_SCHEMA` ! The current schema that the error is related to. Always defaults to `/`. +//! `_severity` a! The Neo4j severity level of the error, which is always `ERROR`. +!`_classification` ! The Neo4j error classification, which can be `CLIENT_ERROR`, `TRANSIENT_ERROR`, or `DATABASE_ERROR`. +! `_position` ! (Optional) The position, given by offset, line and column, where the error is relevant in the query text. +//! `_status_parameters`! A map that contains all variable parts of the status description. +!=== +|=== + +A GQL-status error object can also contain an optional GQL-status object that represents the cause of the error and is used to provide additional, more specific diagnostic information. + +[[gqlstatus-neo4j-defined-codes]] +== Classes of GQLSTATUS error codes + +The GQLSTATUS codes are divided into classes and subclasses. +The class code is a 2-character string that indicates the general condition of the status, such as connection exception, data exception, etc. +The subclass code is a 3-character string that provides more detailed information about the condition. +//Currently, the Neo4j-defined subclasses start with N or I, followed by a 2-digit number, while the standard-defined subclasses start with 0-4 or A, B, C, D, E, F, G, or H and a 2-digit number. + +The following table lists the GQLSTATUS classes and their meanings: + +.GQLSTATUS code classes +[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] +|=== +|Class +|*Condition* + +| 08 +| connection exception +| 22 +| data exception +| 25 +| invalid transaction state +| 40 +| transaction rollback +| 42 +| syntax error or access rule violation +| 50 +| general processing exception +| 51 +| system configuration or operation exception +| 52 +| procedure exception +|=== + +[[neo4j-error-object]] +== Neo4j-status error object + +The Neo4j-status object for errors contains diagnostic information representing the *unsuccessful* outcome of a Cypher query or command execution, including severity, status code, category, description, message, and position in the query text where the error is relevant. +Depending on the application, some of the fields from the error object might not be visible. + +The error object consists of the following fields: + +.Neo4j error object +[cols="<1s,<4"] +|=== +|Neo4j code +a|The Neo4j code in the form of `Neo.[Type].[SubType].[Name]`. +|Description +a|The description of the specific error. +|Message +a|The error message. +|Severity level +a|`ERROR` +|Category +a|The category of the error. +Available categories are `CLIENT_ERROR`, `TRANSIENT_ERROR`, and `DATABASE_ERROR`. +|Position +a|(Optional) The position, given by offset, line and column, where the error is relevant in the query text. +|=== + +For more information, see the xref:errors/all-errors.adoc[List of Neo4j error codes]. + +[[error-types]] +== Types of server errors + +The fact that an error is returned by the server does not always mean that it is a fatal error. +Status codes can also indicate transient problems that may go away if you retry the request. +The server error group determines the effect on the transaction. + +.Server error types +[options="header", cols="<1m,<2,<1"] +|=== + +| Type +| Description +| Effect on the transaction + +| ClientError +| These errors are caused by the client (user input or user application) and are usually related to the request itself. +Changing the request might yield a successful outcome. + Neo4j codes have the prefix `Neo.ClientError`, while the GQLSTATUS codes have `ErrorClassification` of type `CLIENT_ERROR`. +| Rollback + +| TransientError +| These errors are detected by the server and are usually related to some kind of database unavailability, such as limits reached, out-of-memory, timeouts, etc. +The error can be temporary, therefore retrying later might yield a successful outcome. +Neo4j codes have the prefix `Neo.TransientError`, while the GQLSTATUS codes have `ErrorClassification` of type `TRANSIENT_ERROR`. +| Rollback + +| DatabaseError +| These errors are caused by the database and are usually related to the database state and mean that the database failed to service the request. +Neo4j codes have the prefix `Neo.DatabaseError`, while the GQLSTATUS codes have `ErrorClassification` of type `DATABASE_ERROR`. +| Rollback + +// | Database configuration errors +// | Something a DBA can fix +// | Rollback +|=== + +[[error-internals]] +== Error internals + +Neo4j supports server errors in the form of Java exceptions. +Most of these implement the `HasStatus` interface, which means they have a status code in addition to the exception message. + +On the server side, an exception contains normal Java constructors and methods like `getMessage()`, `getCause()`, etc., and additionally the `status()` method from the `HasStatus` API, which returns the status code. + +The exceptions also get new compulsary fields for `gqlStatus`, `statusDescription`, `diagnosticRecord`, and an optional field for `cause`. +The cause field in turn has its own GQLSTATUS, status description, diagnostic record, and message. + +The `getMessage()` method is kept as Java exceptions inherently have this method. +And a new classification field is added to cover the division of client errors, transient errors, and database errors, which today is part of the Neo4j code. +All of these fields construct the GQLSTATUS object, which is sent to the driver as part of the Failure Bolt message. +Exactly how this looks, depends on the combination of driver and server versions. +See <> for more information. + +On the driver side, the Neo4jException is extended with the corresponding methods as on the server side. +The driver receives the Failure Bolt message and extracts the status code and the error message. +Then, it constructs an exception with the status code, error message, and other relevant information, and sends it to the client. + +// Starting from 2025.01, the diagnostic record also contains a `_status_parameters` field, which represens a map that contains all variable parts of the status description, such as labels, database names, Cypher clauses, etc. +// This field is used to provide more detailed information about the error. + +== Query logging + +Since the query log is server-side and DBMS wide, multiple clients connected to the same DBMS write to the same query log. +As the clients can have separate driver versions, they may have different error framework formats. + +In Neo4j 5.25, the default JSON template for the query log is updated to include an `errorInfo` entry. +This entry contains `GQLSTATUS`, `statusDescription`, `classification`, `position` (if applicable), and `cause` (if applicable) with the same entries. +//The `failureReason` entry is deprecated from ... + +// Starting from Neo4j 2025.01, a new JSON template is available for the query log, which is the default set in _server_log.xml_. +// It contains the `errorInfo` entry, but not the `failureReason` entry, which is switched off by default. + + +[[server-driver-compatibility]] +== Server-driver version compatibility + +The server and driver communicate with each other through the Bolt protocol. +During the handshake process, they agree on using the newest possible Bolt protocol version that both the server and the driver support. +For more information on the Bolt versions supported by different server versions, see the link:https://neo4j.com/docs/bolt/current/bolt-compatibility[Bolt Protocol documentation]. + +The new error framework with the additional GQL-status object for errors is available in the JSON format query log for Neo4j server Neo4j 5.25 and later versions. +It is supported over Bolt since Bolt 5.7, which corresponds to version 5.26 or later on both server and driver side. + +To fully utilize the new error framework, both your server and the driver must support it. +Drivers that are older than 5.26 will not send any GQL-status object for exceptions, even if server is 5.26 or later. + +If a driver of version 5.26 or later talks to a server that is older than 5.26, the driver needs to poly-fill the exceptions with a GQL-status object. +In this case, the default GQLSTATUS code 50N42 is returned for all exceptions. + +.Error compatibility matrix +[cols="1,2,2", grid="all", stripes="hover"] +|=== +| +h| Driver 5.25 or older +h| Driver 5.26 or newer + +h| Server 5.24 or older +| Bolt: existing error information + +Query log: existing error information + +| Bolt: additional GQL-status object with default values + +Query log: existing error information + +h| Server 5.25 +| Bolt: existing error information + +Query log: additional errorInfo entry +| Bolt: additional GQL-status object with default values + +Query log: additional errorInfo entry + +h| Server 5.26 or newer +| Bolt: existing error information + +Query log: additional errorInfo entry + +| Bolt: additional GQL-status object -Client errors:: - These errors are caused by the client and are usually related to the request itself. - Client errors have the prefix `Neo.ClientError`. +Query log: additional errorInfo entry -Transient errors:: - These errors are detected by the server and are usually related to some kind of database unavailability, such as limits reached, out-of-memory, timeouts, etc. - The error can be temporary and could therefore succeed if retrying the request. - Transient errors have the prefix `Neo.TransientError`. +|=== -Database errors:: - These errors are caused by the database and are usually related to the database state. - Database errors have the prefix `Neo.DatabaseError`. \ No newline at end of file diff --git a/modules/ROOT/pages/index.adoc b/modules/ROOT/pages/index.adoc index 48b7d109..f542240d 100644 --- a/modules/ROOT/pages/index.adoc +++ b/modules/ROOT/pages/index.adoc @@ -1,68 +1,23 @@ [[status-codes]] ifdef::backend-pdf[] -= Neo4j 5 Status Codes += Status Codes for Errors and Notifications endif::[] ifndef::backend-pdf[] = Introduction endif::[] -:description: The Neo4j status codes for Neo4j version {neo4j-version}. +:description: Status codes for errors and notifications Neo4j 5 :neo4j-buildnumber: {neo4j-version} +This manual covers all status codes for errors and notifications that a Neo4j server may return to indicate the result of a Cypher request. -This document details all status codes that a Neo4j DBMS may return to indicate the outcome of a request. +Starting from 5.23 for notifications and 5.25 for errors, Neo4j supports the GQL standard. + +GQL is the new link:https://www.iso.org/home.html[ISO] International Standard query language for graph databases. +Cypher®, Neo4j’s query language, supports most mandatory and a substantial portion of the optional GQL features (as defined by the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard]). +For more information, see link:https://neo4j.com/docs/cypher-manual/current/appendix/gql-conformance/[Cypher Manual -> GQL conformance]. - -== Format - -Each Neo4j status code follows the same format: - -[source, status code format, role="noheader"] ------ -Neo.[Type].[SubType].[Name] ------ - - -== Types of Neo4j status codes - -The fact that a Neo4j status code is returned by the server does not always mean there is a fatal error. -Neo4j status codes can also indicate transient problems that may go away if you retry the request. -The type of the status code determines the effect on the transaction. - -.Neo4j status code types -[options="header", cols="<1m,<2,<1"] -|=== - -| Type -| Description -| Effect on the transaction - -| xref:errors/all-errors.adoc#_client_errors[ClientError] -| The Client sent a bad request - changing the request might yield a successful outcome. -| Rollback - -| xref:errors/all-errors#_transient_errors[TransientError] -| The database cannot service the request right now, retrying later might yield a successful outcome. -| Rollback - -| xref:errors/all-errors#_database_error[DatabaseError] -| The database failed to service the request. -| Rollback - -| xref:notifications/index.adoc[ClientNotifications] -| The query execution was successful, but there are notifications about the request sent by the client. -| None - -|=== - -[NOTE] -==== -From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API. - -The GqlStatusObject API provides information about the status of a Cypher query or command execution in compliance with the GQL standard. -It includes GQLSTATUS code, StatusDescription, and DiagnosticRecord. -For more information, see xref:notifications/index.adoc#gqlstatus-notification-object[GQL-status notification object]. -==== +As part of this GQL compliance, Cypher also includes status codes that a GQL-compliant DBMS returns to indicate the outcome of a request. +For more information on the GQL-status object framework for notifications and errors, see xref:notifications/index.adoc[] and xref:errors/index.adoc[]. ifndef::backend-pdf[] License: link:{common-license-page-uri}[Creative Commons 4.0] @@ -70,4 +25,4 @@ endif::[] ifdef::backend-pdf[] License: Creative Commons 4.0 -endif::[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 79586373..5af16897 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -1,9 +1,9 @@ :description: This section describes the notifications that Neo4j can return, grouped by category, and an example of when they can occur. [[listOfNnotifications]] -= List of all server notification codes += List of notification codes -The following page provides an overview of all notifications in Neo4j, along with some scenarios and their possible solutions. +The following page provides an overview of all notifications in Neo4j, including the GQLSTATUS codes and Neo4j codes, along with some scenarios and their possible solutions. * <<_performance_notifications, `PERFORMANCE` notifications>> * <<_hint_notifications, `HINT` notifications>> @@ -15,6 +15,11 @@ The following page provides an overview of all notifications in Neo4j, along wit * <<_schema_notifications, `SCHEMA` notifications>> * <<_generic, `GENERIC` notifications>> +[WARNING] +==== +Please note that while GQLSTATUS codes remain stable (any changes to them will be breaking), changes to status descriptions associated with these codes are not breaking and may happen at any time. +For this reason, parsing the status descriptions or incorporating them into scripts is not recommended. +==== [#_performance_notifications] == `PERFORMANCE` notifications @@ -53,7 +58,7 @@ m|INFORMATION .A query that contains many disconnected patterns [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -63,12 +68,13 @@ Query:: MATCH (c:Child), (p:Parent) RETURN c, p ---- -Description of the returned code:: -If a part of a query contains multiple disconnected patterns, -this will build a cartesian product between all those parts. -This may produce a large amount of data and slow down query processing. -While occasionally intended, it may often be possible to reformulate the query that avoids the use of this cross product, -perhaps by adding a relationship between the different parts or by using `OPTIONAL MATCH` (identifier is: (`p`)) +Returned GQLSTATUS code:: +03N90 + +Returned status description:: +info: cartesian product. +The disconnected patterns `(c:Child), (p:Parent)` build a cartesian product. +A cartesian product may produce a large amount of data and slow down query processing. Suggestions for improvement:: In case a Cartesian product is needed, nothing can be done to improve this query. @@ -81,7 +87,7 @@ MATCH (c:Child)-[:ChildOf]->(p:Parent) RETURN c, p ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -91,13 +97,12 @@ Query:: MATCH (c:Child), (p:Parent) RETURN c, p ---- -Returned GQLSTATUS code:: -03N90 - -Returned status description:: -info: cartesian product. -The disconnected patterns `(c:Child), (p:Parent)` build a cartesian product. -A cartesian product may produce a large amount of data and slow down query processing. +Description of the returned code:: +If a part of a query contains multiple disconnected patterns, +this will build a cartesian product between all those parts. +This may produce a large amount of data and slow down query processing. +While occasionally intended, it may often be possible to reformulate the query that avoids the use of this cross product, +perhaps by adding a relationship between the different parts or by using `OPTIONAL MATCH` (identifier is: (`p`)) Suggestions for improvement:: In case a Cartesian product is needed, nothing can be done to improve this query. @@ -120,7 +125,7 @@ This notification is returned when there is no upper bound specified on the vari .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.UnboundedVariableLengthPattern |Title a|The provided pattern is unbounded, consider adding an upper limit to the number of node hops. @@ -144,7 +149,7 @@ m|INFORMATION .Shortest path with an unbounded pattern [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -156,9 +161,14 @@ WHERE n <> m RETURN p ---- -Description of the returned code:: -Using shortest path with an unbounded pattern will likely result in long execution times. -It is recommended to use an upper limit to the number of node hops in your pattern. +Returned GQLSTATUS code:: +03N91 + +Returned status description:: +info: unbounded variable length pattern. +The provided pattern `(n)-[\*]->(m)` is unbounded. +Shortest path with an unbounded pattern may result in long execution times. +Use an upper limit (e.g. `[*..5]`) on the number of node hops in your pattern. Suggestions for improvement:: If you have a big graph, this query might be very slow. @@ -171,26 +181,19 @@ WHERE n <> m RETURN p ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + [source, cypher, role="noplay"] ---- -MATCH p=shortestPath((n)-[*]->(m)) -WHERE n <> m -RETURN p +MATCH p=shortestPath((n)-[*]->(m)) RETURN p ---- -Returned GQLSTATUS code:: -03N91 - -Returned status description:: -info: unbounded variable length pattern. -The provided pattern `(n)-[\*]->(m)` is unbounded. -Shortest path with an unbounded pattern may result in long execution times. -Use an upper limit (e.g. `[*..5]`) on the number of node hops in your pattern. +Description of the returned code:: +Using shortest path with an unbounded pattern will likely result in long execution times. +It is recommended to use an upper limit to the number of node hops in your pattern. Suggestions for improvement:: If you have a big graph, this query might be very slow. @@ -198,9 +201,7 @@ Consider adding an upper limit. + [source, cypher, role="noplay"] ---- -MATCH p=shortestPath((n)-[*..8]->(m)) -WHERE n <> m -RETURN p +MATCH p=shortestPath((n)-[*..8]->(m)) RETURN p ---- ====== ===== @@ -214,7 +215,7 @@ For more information, see link:https://neo4j.com/docs/cypher-manual/current/exec .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.ExhaustiveShortestPath |Title a|Exhaustive shortest path has been planned for your query that means that shortest path graph algorithm might not be used to find the shortest path. @@ -239,7 +240,7 @@ m|INFORMATION .A query that runs with an exhaustive shortest path [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -250,9 +251,13 @@ WHERE ANY(n in nodes(p) WHERE n:Label) RETURN p ---- -Description of the returned code:: -Using shortest path with an exhaustive search fallback might cause query slow down since shortest path graph algorithms might not work for this use case. -It is recommended to introduce a `WITH` to separate the `MATCH` containing the shortest path from the existential predicates on that path. +Returned GQLSTATUS code:: +03N92 + +Returned status description:: +info: exhaustive shortest path. +The query runs with exhaustive shortest path due to the existential predicate(s) `ANY(n in nodes(p) WHERE n:Label)`. +It may be possible to use `WITH` to separate the `MATCH` from the existential predicate(s). Suggestions for improvement:: Separate the predicate by introducing a `WITH` after the `MATCH` clause. @@ -265,7 +270,7 @@ WHERE ANY(n in nodes(p) WHERE n:Label) RETURN p ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -276,13 +281,9 @@ WHERE ANY(n in nodes(p) WHERE n:Label) RETURN p ---- -Returned GQLSTATUS code:: -03N92 - -Returned status description:: -info: exhaustive shortest path. -The query runs with exhaustive shortest path due to the existential predicate(s) `ANY(n in nodes(p) WHERE n:Label)`. -It may be possible to use `WITH` to separate the `MATCH` from the existential predicate(s). +Description of the returned code:: +Using shortest path with an exhaustive search fallback might cause query slow down since shortest path graph algorithms might not work for this use case. +It is recommended to introduce a `WITH` to separate the `MATCH` containing the shortest path from the existential predicates on that path. Suggestions for improvement:: Separate the predicate by introducing a `WITH` after the `MATCH` clause. @@ -307,7 +308,7 @@ Adding an index could improve the query speed. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.NoApplicableIndex |Title a|Adding a schema index may speed up this query. @@ -331,7 +332,7 @@ m|INFORMATION .`LOAD CSV` with `MATCH` or `MERGE` [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -341,9 +342,13 @@ Query:: LOAD CSV FROM 'file:///ignore/ignore.csv' AS line WITH * MATCH (n:Person{name:line[0]}) RETURN line, n ---- -Description of the returned code:: -Using `LOAD CSV` followed by a `MATCH` or `MERGE` that matches a non-indexed label will most likely not perform well on large data sets. -Please consider using a schema index. +Returned GQLSTATUS code:: +03N93 + +Returned status description:: +info: no applicable index. +`LOAD CSV` in combination with `MATCH` or `MERGE` on a label that does not have an index may result in long execution times. +Consider adding an index for label `Person`. Suggestions for improvement:: Create an index on the label and property you match. @@ -352,9 +357,8 @@ Create an index on the label and property you match. ---- CREATE INDEX FOR (n:Person) ON (n.name) ---- - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -364,13 +368,9 @@ Query:: LOAD CSV FROM 'file:///ignore/ignore.csv' AS line WITH * MATCH (n:Person{name:line[0]}) RETURN line, n ---- -Returned GQLSTATUS code:: -03N93 - -Returned status description:: -info: no applicable index. -`LOAD CSV` in combination with `MATCH` or `MERGE` on a label that does not have an index may result in long execution times. -Consider adding an index for label `Person`. +Description of the returned code:: +Using `LOAD CSV` followed by a `MATCH` or `MERGE` that matches a non-indexed label will most likely not perform well on large data sets. +Please consider using a schema index. Suggestions for improvement:: Create an index on the label and property you match. @@ -379,6 +379,7 @@ Create an index on the label and property you match. ---- CREATE INDEX FOR (n:Person) ON (n.name) ---- + ====== ===== @@ -390,7 +391,7 @@ This notification is returned when the execution plan for a query contains the ` .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.EagerOperator |Title a|The execution plan for this query contains the Eager operator, which forces all dependent data to be materialized in main memory before proceeding @@ -414,11 +415,9 @@ m|INFORMATION .`LOAD CSV` with an Eager operator [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== -`LOAD CSV` together with an Eager operator can take up a lot of memory. - Query:: + [source, cypher, role="noplay"] @@ -426,9 +425,13 @@ Query:: LOAD CSV FROM 'file:///ignore/ignore.csv' AS line MATCH (n:Person{name:line[0]}) DELETE n RETURN line ---- -Description of the returned code:: -Using `LOAD CSV` with a large data set in a query where the execution plan contains the Eager operator could potentially consume a lot of memory and is likely to not perform well. -See the Neo4j Manual entry on the Eager operator for more information and hints on how problems could be avoided. +Returned GQLSTATUS code:: +03N94 + +Returned status description:: +info: eager operator. +The query execution plan contains the `Eager` operator. +`LOAD CSV` in combination with `Eager` can consume a lot of memory. Suggestions for improvement:: See the link:https://neo4j.com/docs/cypher-manual/current/planning-and-tuning/operators/operators-detail/#query-plan-eager[Cypher Manual -> Eager operator] for more information and hints on how to avoid problems. @@ -443,11 +446,12 @@ CALL { } RETURN line ---- - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== +`LOAD CSV` together with an Eager operator can take up a lot of memory. + Query:: + [source, cypher, role="noplay"] @@ -455,13 +459,9 @@ Query:: LOAD CSV FROM 'file:///ignore/ignore.csv' AS line MATCH (n:Person{name:line[0]}) DELETE n RETURN line ---- -Returned GQLSTATUS code:: -03N94 - -Returned status description:: -info: eager operator. -The query execution plan contains the `Eager` operator. -`LOAD CSV` in combination with `Eager` can consume a lot of memory. +Description of the returned code:: +Using `LOAD CSV` with a large data set in a query where the execution plan contains the Eager operator could potentially consume a lot of memory and is likely to not perform well. +See the Neo4j Manual entry on the Eager operator for more information and hints on how problems could be avoided. Suggestions for improvement:: See the link:https://neo4j.com/docs/cypher-manual/current/planning-and-tuning/operators/operators-detail/#query-plan-eager[Cypher Manual -> Eager operator] for more information and hints on how to avoid problems. @@ -476,6 +476,7 @@ CALL { } RETURN line ---- + ====== ===== @@ -486,7 +487,7 @@ RETURN line .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.DynamicProperty |Title a|Queries using dynamic properties will use neither index seeks nor index scans for those properties @@ -510,7 +511,7 @@ m|INFORMATION .A dynamic node property key makes it impossible to use indexes [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -520,8 +521,14 @@ Query:: MATCH (n:Person) WHERE n[$prop] IS NOT NULL RETURN n; ---- -Description of the returned code:: -Using a dynamic property makes it impossible to use an index lookup for this query (indexed label is: `Person`) +Returned GQLSTATUS code:: +03N95 + +Returned status description:: +info: dynamic property. +An index exists on label/type(s) `Person`. +It is not possible to use indexes for dynamic properties. +Consider using static properties. Suggestions for improvement:: If there is an index for `(n:Person) ON (n.name)`, it will not be used for the above query because the query is using a dynamic property. @@ -534,7 +541,7 @@ MATCH (n:Person) WHERE n.name IS NOT NULL RETURN n; ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -544,14 +551,8 @@ Query:: MATCH (n:Person) WHERE n[$prop] IS NOT NULL RETURN n; ---- -Returned GQLSTATUS code:: -03N95 - -Returned status description:: -info: dynamic property. -An index exists on label/type(s) `Person`. -It is not possible to use indexes for dynamic properties. -Consider using static properties. +Description of the returned code:: +Using a dynamic property makes it impossible to use an index lookup for this query (indexed label is: `Person`) Suggestions for improvement:: If there is an index for `(n:Person) ON (n.name)`, it will not be used for the above query because the query is using a dynamic property. @@ -569,7 +570,7 @@ MATCH (n:Person) WHERE n.name IS NOT NULL RETURN n; .A dynamic relationship property key makes it impossible to use indexes [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -579,8 +580,14 @@ Query:: MATCH ()-[r: KNOWS]->() WHERE r[$prop] IS NOT NULL RETURN r ---- -Description of the returned code:: -Using a dynamic property makes it impossible to use an index lookup for this query (indexed type is: `KNOWS`) +Returned GQLSTATUS code:: +03N95 + +Returned status description:: +info: dynamic property. +An index exists on label/type(s) `KNOWS`. +It is not possible to use indexes for dynamic properties. +Consider using static properties. Suggestions for improvement:: Similar to dynamic node properties, use a constant value if possible, especially when there is an index on the relationship property. @@ -592,7 +599,7 @@ MATCH ()-[r: KNOWS]->() WHERE r.since IS NOT NULL RETURN r ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -602,18 +609,12 @@ Query:: MATCH ()-[r: KNOWS]->() WHERE r[$prop] IS NOT NULL RETURN r ---- -Returned GQLSTATUS code:: -03N95 - -Returned status description:: -info: dynamic property. -An index exists on label/type(s) `KNOWS`. -It is not possible to use indexes for dynamic properties. -Consider using static properties. +Description of the returned code:: +Using a dynamic property makes it impossible to use an index lookup for this query (indexed type is: `KNOWS`) Suggestions for improvement:: Similar to dynamic node properties, use a constant value if possible, especially when there is an index on the relationship property. -For example, if `{ $prop }` is equal to `since`, you can rewrite the query to: +For example, if `$prop` is equal to `since`, you can rewrite the query to: + [source, cypher] ---- @@ -632,7 +633,7 @@ For more information about the specific query, see the stack trace in the _debug .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.CodeGenerationFailed |Title a|The database was unable to generate code for the query. A stacktrace can be found in the _debug.log_. @@ -667,7 +668,7 @@ In this case, the query will return an error. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.JoinHintUnfulfillableWarning |Title a|The database was unable to plan a hinted join. @@ -690,7 +691,7 @@ m|WARNING .Inability to fulfill the hint despite the given `JOIN` hint [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -705,17 +706,20 @@ OPTIONAL MATCH (a)--(c) RETURN * ---- -Description of the returned code:: -The hinted join was not planned. -This could happen because no generated plan contained the join key, -please try using a different join key or restructure your query. (hinted join key identifier is: `a`) +Returned GQLSTATUS code:: +01N30 + +Returned status description:: +warn: joint hint unfulfillable. +Unable to create a plan with `JOIN ON a`. +Try to change the join key(s) or restructure your query. Suggestions for improvement:: The `JOIN` hint cannot be applied because its specified variable is before the `OPTIONAL MATCH` and, therefore, is already bound. The only option for this query is to either remove the hint or modify the query to allow it to be used. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -730,13 +734,10 @@ OPTIONAL MATCH (a)--(c) RETURN * ---- -Returned GQLSTATUS code:: -01N30 - -Returned status description:: -warn: joint hint unfulfillable. -Unable to create a plan with `JOIN ON a`. -Try to change the join key(s) or restructure your query. +Description of the returned code:: +The hinted join was not planned. +This could happen because no generated plan contained the join key, +please try using a different join key or restructure your query. (hinted join key identifier is: `a`) Suggestions for improvement:: The `JOIN` hint cannot be applied because its specified variable is before the `OPTIONAL MATCH` and, therefore, is already bound. @@ -752,7 +753,7 @@ The only option for this query is to either remove the hint or modify the query .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Schema.HintedIndexNotFound |Title a|The request (directly or indirectly) referred to an index that does not exist. @@ -774,7 +775,7 @@ m|WARNING .Inability to use the label index despite the given index hint [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -787,15 +788,18 @@ WHERE a.id = 1 RETURN a ---- -Description of the returned code:: -The hinted index does not exist, please check the schema (index is: INDEX FOR (`a`:`Label`) ON (`a`.`id`)) +Returned GQLSTATUS code:: +01N31 + +Returned status description:: +warn: hinted index not found. +Unable to create a plan with `INDEX :Label(id)` because the index does not exist. Suggestions for improvement:: The hinted index does not exist, make sure the label and property are spelled correctly. If the spelling is correct, either create the index or remove the hint from the query. - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -808,23 +812,20 @@ WHERE a.id = 1 RETURN a ---- -Returned GQLSTATUS code:: -01N31 - -Returned status description:: -warn: hinted index not found. -Unable to create a plan with `INDEX :Label(id)` because the index does not exist. +Description of the returned code:: +The hinted index does not exist, please check the schema (index is: INDEX FOR (`a`:`Label`) ON (`a`.`id`)) Suggestions for improvement:: The hinted index does not exist, make sure the label and property are spelled correctly. If the spelling is correct, either create the index or remove the hint from the query. + ====== ===== .Inability to use the relationship index despite the given index hint [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -837,15 +838,18 @@ WHERE r.id = 1 RETURN r ---- -Description of the returned code:: -The hinted index does not exist, please check the schema (index is: INDEX FOR ()-[`r`:`Rel`]-() ON (`r`.`id`)) +Returned GQLSTATUS code:: +01N31 + +Returned status description:: +warn: hinted index not found. +Unable to create a plan with `INDEX :Rel(id)` because the index does not exist. Suggestions for improvement:: The hinted index does not exist, make sure the relationship type and property are spelled correctly. If the spelling is correct, either create the index or remove the hint from the query. - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -858,16 +862,13 @@ WHERE r.id = 1 RETURN r ---- -Returned GQLSTATUS code:: -01N31 - -Returned status description:: -warn: hinted index not found. -Unable to create a plan with `INDEX :Rel(id)` because the index does not exist. +Description of the returned code:: +The hinted index does not exist, please check the schema (index is: INDEX FOR ()-[`r`:`Rel`]-() ON (`r`.`id`)) Suggestions for improvement:: The hinted index does not exist, make sure the relationship type and property are spelled correctly. If the spelling is correct, either create the index or remove the hint from the query. + ====== ===== @@ -882,7 +883,7 @@ Unrecognized notifications are returned when the query or command mentions entit .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Database.HomeDatabaseNotFound |Title a|The request referred to a home database that does not exist. @@ -906,7 +907,7 @@ m|INFORMATION .Setting the `home` database to a database that does not exist [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -916,15 +917,18 @@ Query:: CREATE USER john SET PASSWORD "secret" SET HOME DATABASE nej4 ---- -Description of the returned code:: -The home database provided does not currently exist in the DBMS. -This command will not take effect until this database is created. (HOME DATABASE: `nej4`) +Returned GQLSTATUS code:: +00N50 + +Returned status description:: +note: successful completion - home database not found. +The database `ne4j` does not exist. +Verify that the spelling is correct or create the database for the command to take effect. Suggestions for improvement:: Verify that the home database name is not misspelled. - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -934,16 +938,13 @@ Query:: CREATE USER john SET PASSWORD "secret" SET HOME DATABASE nej4 ---- -Returned GQLSTATUS code:: -00N50 - -Returned status description:: -note: successful completion - home database not found. -The database `ne4j` does not exist. -Verify that the spelling is correct or create the database for the command to take effect. +Description of the returned code:: +The home database provided does not currently exist in the DBMS. +This command will not take effect until this database is created. (HOME DATABASE: `nej4`) Suggestions for improvement:: Verify that the home database name is not misspelled. + ====== ===== @@ -953,7 +954,7 @@ Verify that the home database name is not misspelled. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.UnknownLabelWarning |Title a|The provided label is not in the database. @@ -976,7 +977,7 @@ m|WARNING .Matching on a node with a label that does not exist in the database [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: @@ -986,15 +987,19 @@ Query:: MATCH (n:Perso) RETURN n ---- -Description of the returned code:: -One of the labels in your query is not available in the database, make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing label name is: `Perso`) +Returned GQLSTATUS code:: +01N50 + +Returned status description:: +warn: unknown label. +The label `Perso` does not exist. +Verify that the spelling is correct. Suggestions for improvement:: Verify that the label is not misspelled. -If you plan to create nodes with that label in the future, then no change is needed. - +If you plan to create nodes with that label in the future, no change is needed. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: @@ -1004,17 +1009,13 @@ Query:: MATCH (n:Perso) RETURN n ---- -Returned GQLSTATUS code:: -01N50 - -Returned status description:: -warn: unknown label. -The label `Perso` does not exist. -Verify that the spelling is correct. +Description of the returned code:: +One of the labels in your query is not available in the database, make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing label name is: `Perso`) Suggestions for improvement:: Verify that the label is not misspelled. -If you plan to create nodes with that label in the future, no change is needed. +If you plan to create nodes with that label in the future, then no change is needed. + ====== ===== @@ -1024,7 +1025,7 @@ If you plan to create nodes with that label in the future, no change is needed. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.UnknownRelationshipTypeWarning |Title a|The provided relationship type is not in the database. @@ -1048,7 +1049,7 @@ m|WARNING .Matching a relationship with a type that does not exist [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1057,16 +1058,19 @@ Query:: MATCH (n)-[:NonExistingType]->() RETURN n ---- -Description of the returned code:: -One of the relationship types in your query is not available in the database, -make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing relationship type is: `NonExistingType`) +Returned GQLSTATUS code:: +01N51 + +Returned status description:: +warn: unknown relationship type. +The relationship type `NonExistingType` does not exist. +Verify that the spelling is correct. Suggestions for improvement:: Verify that the relationship type is not misspelled. If you plan to create relationships of this type in the future, no change is needed. - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1075,17 +1079,14 @@ Query:: MATCH (n)-[:NonExistingType]->() RETURN n ---- -Returned GQLSTATUS code:: -01N51 - -Returned status description:: -warn: unknown relationship type. -The relationship type `NonExistingType` does not exist. -Verify that the spelling is correct. +Description of the returned code:: +One of the relationship types in your query is not available in the database, +make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing relationship type is: `NonExistingType`) Suggestions for improvement:: Verify that the relationship type is not misspelled. If you plan to create relationships of this type in the future, no change is needed. + ====== ===== @@ -1095,7 +1096,7 @@ If you plan to create relationships of this type in the future, no change is nee .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.UnknownPropertyKeyWarning |Title a|The provided property key is not in the database @@ -1119,7 +1120,7 @@ m|WARNING .Matching a property key that does not exist [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1129,16 +1130,19 @@ MATCH (n:Person {nme:”Tom”}) RETURN n ---- -Description of the returned code:: -One of the property names in your query is not available in the database, -make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing property name is: `nme`) +Returned GQLSTATUS code:: +01N52 + +Returned status description:: +warn: unknown property key. +The property `nme` does not exist. +Verify that the spelling is correct. Suggestions for improvement:: Verify that the property key is not misspelled. If you plan to create that property key in the future, no change is needed. - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1148,17 +1152,14 @@ MATCH (n:Person {nme:”Tom”}) RETURN n ---- -Returned GQLSTATUS code:: -01N52 - -Returned status description:: -warn: unknown property key. -The property `nme` does not exist. -Verify that the spelling is correct. +Description of the returned code:: +One of the property names in your query is not available in the database, +make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing property name is: `nme`) Suggestions for improvement:: Verify that the property key is not misspelled. If you plan to create that property key in the future, no change is needed. + ====== ===== @@ -1168,7 +1169,7 @@ If you plan to create that property key in the future, no change is needed. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.AggregationSkippedNull |Title a|The query contains an aggregation function that skips null values. @@ -1189,17 +1190,6 @@ m|WARNING .Aggregation skipping a NULL value [.tabbed-example] ===== -[.include-with-neo4j-code] -====== -Query:: - -[source,cypher] ----- -UNWIND [1, NULL, 2] AS i RETURN count(i) AS sum ----- -Description of the returned code:: -The query contains an aggregation function that skips null values. -====== [.include-with-GQLSTATUS-code] ====== Query:: @@ -1215,6 +1205,17 @@ Returned GQLSTATUS code:: Returned status description:: warn: null value eliminated in set function. ====== +[.include-with-neo4j--code] +====== +Query:: + +[source,cypher] +---- +UNWIND [1, NULL, 2] AS i RETURN count(i) AS sum +---- +Description of the returned code:: +The query contains an aggregation function that skips null values. +====== ===== [#_unsupported_notifications] @@ -1228,7 +1229,7 @@ Unsupported notifications are returned when the query or command is trying to us .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.RuntimeUnsupportedWarning |Title a|This query is not supported by the chosen runtime. @@ -1252,19 +1253,22 @@ m|WARNING .A runtime is not supported by a Cypher command [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== - Query:: + [source,cypher] ---- -CYPHER runtime=pipelined SHOW INDEXES YIELD * +EXPLAIN CYPHER runtime=pipelined SHOW INDEXES YIELD * ---- -Description of the returned code:: -Selected runtime is unsupported for this query, please use a different runtime instead or fallback to default. -(Pipelined does not yet support the plans including `ShowIndexes`, use another runtime.) +Returned GQLSTATUS code:: +01N40 + +Returned status description:: +warn: unsupported runtime. +The query cannot be executed with `runtime=pipelined`, `runtime=slotted` is used. +Cause: Pipelined does not yet support the plans including `ShowIndexes`, use another runtime. Suggestions for improvement:: Use a different runtime or remove the runtime option to run the query with the default runtime: @@ -1273,24 +1277,20 @@ Use a different runtime or remove the runtime option to run the query with the d ---- SHOW INDEXES YIELD * ---- - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== + Query:: + [source,cypher] ---- -EXPLAIN CYPHER runtime=pipelined SHOW INDEXES YIELD * +CYPHER runtime=pipelined SHOW INDEXES YIELD * ---- -Returned GQLSTATUS code:: -01N40 - -Returned status description:: -warn: unsupported runtime. -The query cannot be executed with `runtime=pipelined`, `runtime=slotted` is used. -Cause: Pipelined does not yet support the plans including `ShowIndexes`, use another runtime. +Description of the returned code:: +Selected runtime is unsupported for this query, please use a different runtime instead or fallback to default. +(Pipelined does not yet support the plans including `ShowIndexes`, use another runtime.) Suggestions for improvement:: Use a different runtime or remove the runtime option to run the query with the default runtime: @@ -1299,6 +1299,7 @@ Use a different runtime or remove the runtime option to run the query with the d ---- SHOW INDEXES YIELD * ---- + ====== ===== @@ -1314,7 +1315,7 @@ The usage of this notification has been removed since Neo4j 5.14. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.RuntimeExperimental |Title a|This feature is experimental and should not be used in production systems. @@ -1359,7 +1360,7 @@ It is important to change to the new functionality, otherwise, the query might b .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.FeatureDeprecationWarning |Title a|This feature is deprecated and will be removed in future versions. @@ -1373,7 +1374,7 @@ a| To continue using it, escape the identifier by adding backticks around the identifier `%s`. - The character with the Unicode representation `%s` is deprecated for unescaped identifiers and will not be supported in the future. To continue using it, escape the identifier by adding backticks around the identifier `%s`. -- All subqueries in a UNION [ALL] should have the same ordering for the return columns. +- label:new[Valid for Neo4j 5.5-5.25] All subqueries in a UNION [ALL] should have the same ordering for the return columns. Using differently ordered return items in a UNION [ALL] clause is deprecated and will be removed in a future version. - Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. Names containing `.` should be escaped. (`%s`) @@ -1392,7 +1393,7 @@ m|WARNING .Create a database with an unescaped name containing a dot [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1401,9 +1402,12 @@ Query:: CREATE DATABASE foo.bar ---- -Description of the returned code:: -Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. -Names containing `.` should be escaped. (Name: `foo.bar`) +Returned GQLSTATUS code:: +01N00 + +Returned status description:: +warn: feature deprecated. +Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. Names containing `.` should be escaped. (Name: foo.bar) Suggestions for improvement:: If not intended for a composite database, escape the name with the character ```. @@ -1412,9 +1416,8 @@ If not intended for a composite database, escape the name with the character ``` ---- CREATE DATABASE `foo.bar` ---- - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1423,27 +1426,17 @@ Query:: CREATE DATABASE foo.bar ---- -Returned GQLSTATUS code:: -01N00 - -Returned status description:: -warn: feature deprecated. -Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. Names containing `.` should be escaped. (Name: foo.bar) +Description of the returned code:: +Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. +Names containing `.` should be escaped. (Name: `foo.bar`) -Suggestions for improvement:: -If not intended for a composite database, escape the name with the character ```. -+ -[source,cypher] ----- -CREATE DATABASE `foo.bar` ----- ====== ===== .Using differently ordered return items in a `UNION` clause [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1454,23 +1447,27 @@ UNION RETURN 'val' as two, 'val' as one ---- -Description of the returned code:: +Returned GQLSTATUS code:: +01N00 + +Returned status description:: +warn: feature deprecated. All subqueries in a UNION [ALL] should have the same ordering for the return columns. Using differently ordered return items in a UNION [ALL] clause is deprecated and will be removed in a future version. -Suggestions for improvement:: -Use the same order for the return columns in all subqueries combined by a `UNION` clause. +====== +===== -+ -[source,cypher] ----- -RETURN 'val' as one, 'val' as two -UNION -RETURN 'val' as one, 'val' as two ----- +[NOTE] +==== +Using differently ordered return items in a UNION [ALL] clause is deprecated in versions 5.5 to 5.25. +However, starting from version 5.26, the deprecation has been withdrawn following cost-benefit analysis and valuable user feedback. +==== -====== -[.include-with-GQLSTATUS-code] +.Using the Unicode \u0085 in an unescaped identifier +[.tabbed-example] +===== +[.include-with-neo4j-code] ====== Query:: + @@ -1481,11 +1478,7 @@ UNION RETURN 'val' as two, 'val' as one ---- -Returned GQLSTATUS code:: -01N00 - -Returned status description:: -warn: feature deprecated. +Description of the returned code:: All subqueries in a UNION [ALL] should have the same ordering for the return columns. Using differently ordered return items in a UNION [ALL] clause is deprecated and will be removed in a future version. @@ -1499,13 +1492,14 @@ RETURN 'val' as one, 'val' as two UNION RETURN 'val' as one, 'val' as two ---- + ====== ===== .Using the Unicode \u0085 in an unescaped identifier [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1513,11 +1507,16 @@ Query:: ---- RETURN 1 as my\u0085identifier ---- -Description of the returned code:: -The Unicode character `\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. To continue using it, escape the identifier by adding backticks around the identifier `my\u0085identifier`. +Returned GQLSTATUS code:: +01N00 + +Returned status description:: +warn: feature deprecated. +The Unicode character `\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. +To continue using it, escape the identifier by adding backticks around the identifier `my\u0085identifier`. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1525,14 +1524,9 @@ Query:: ---- RETURN 1 as my\u0085identifier ---- +Description of the returned code:: +The Unicode character `\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. To continue using it, escape the identifier by adding backticks around the identifier `my\u0085identifier`. -Returned GQLSTATUS code:: -01N00 - -Returned status description:: -warn: feature deprecated. -The Unicode character `\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. -To continue using it, escape the identifier by adding backticks around the identifier `my\u0085identifier`. ====== ===== @@ -1542,7 +1536,7 @@ To continue using it, escape the identifier by adding backticks around the ident .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.FeatureDeprecationWarning |Title a|This feature is deprecated and will be removed in future versions. @@ -1575,7 +1569,7 @@ m|WARNING .Colon after the vertical bar `|:` in a relationship pattern [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1584,8 +1578,13 @@ Query:: MATCH (a)-[:A|:B|:C]-() RETURN * ---- -Description of the returned code:: -The semantics of using colon in the separation of alternative relationship types will change in a future version. (Please use ':A|B|C' instead) +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`:A|:B|:C` is deprecated. +It is replaced by `:A|B|C`. Suggestions for improvement:: Remove the colon inside the relationship type expression. @@ -1596,7 +1595,7 @@ MATCH (a)-[:A|B|C]-() RETURN * ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1605,13 +1604,8 @@ Query:: MATCH (a)-[:A|:B|:C]-() RETURN * ---- -Returned GQLSTATUS code:: -01N01 - -Returned status description:: -warn: feature deprecated with replacement. -`:A|:B|:C` is deprecated. -It is replaced by `:A|B|C`. +Description of the returned code:: +The semantics of using colon in the separation of alternative relationship types will change in a future version. (Please use ':A|B|C' instead) Suggestions for improvement:: Remove the colon inside the relationship type expression. @@ -1627,7 +1621,7 @@ MATCH (a)-[:A|B|C]-() RETURN * .Setting properties using a node [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1637,9 +1631,13 @@ MATCH (a)-[]-(b) SET a = b ---- -Description of the returned code:: -The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. -Please use `properties()` instead. +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`SET a = b` is deprecated. +It is replaced by `SET a = properties(b)`. Suggestions for improvement:: Use the `properties()` function to get all properties from `b`. @@ -1651,7 +1649,7 @@ SET a = properties(b) ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1661,13 +1659,9 @@ MATCH (a)-[]-(b) SET a = b ---- -Returned GQLSTATUS code:: -01N01 - -Returned status description:: -warn: feature deprecated with replacement. -`SET a = b` is deprecated. -It is replaced by `SET a = properties(b)`. +Description of the returned code:: +The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. +Please use `properties()` instead. Suggestions for improvement:: Use the `properties()` function to get all properties from `b`. @@ -1685,7 +1679,7 @@ SET a = properties(b) .Setting properties using a relationship [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -1695,9 +1689,13 @@ MATCH (a)-[r]-(b) SET a += r ---- -Description of the returned code:: -The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. -Please use `properties()` instead. +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`SET a += r` is deprecated. +It is replaced by `SET a += properties(r)`. Suggestions for improvement:: Use the `properties()` function to get all properties from `r`. @@ -1707,9 +1705,8 @@ Use the `properties()` function to get all properties from `r`. MATCH (a)-[r]-(b) SET a += properties(r) ---- - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1719,13 +1716,9 @@ MATCH (a)-[r]-(b) SET a += r ---- -Returned GQLSTATUS code:: -01N01 - -Returned status description:: -warn: feature deprecated with replacement. -`SET a += r` is deprecated. -It is replaced by `SET a += properties(r)`. +Description of the returned code:: +The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. +Please use `properties()` instead. Suggestions for improvement:: Use the `properties()` function to get all properties from `r`. @@ -1735,6 +1728,7 @@ Use the `properties()` function to get all properties from `r`. MATCH (a)-[r]-(b) SET a += properties(r) ---- + ====== ===== @@ -1742,7 +1736,33 @@ SET a += properties(r) .Shortest path with a fixed relationship length [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a:Start), shortestPath((a)-[r]->()) RETURN a +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`shortestPath\((a)-[r]->())` is deprecated. +It is replaced by `shortestPath\((n)-[r*1..1]->(m))`. + +Suggestions for improvement:: +If the relationship length is fixed, there is no reason to search for the shortest path. +Instead, you can rewrite it to the following: ++ +[source,cypher] +---- +MATCH (a: Start)-[r]->(b: End) RETURN b LIMIT 1 +---- +====== +[.include-with-neo4j--code] ====== Query:: + @@ -1765,13 +1785,18 @@ MATCH (a: Start)-[r]->(b: End) RETURN b LIMIT 1 ---- ====== +===== + +.Using a deprecated runtime option +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== Query:: + [source,cypher] ---- -MATCH (a:Start), shortestPath((a)-[r]->()) RETURN a +CYPHER runtime = interpreted MATCH (n) RETURN n ---- Returned GQLSTATUS code:: @@ -1779,24 +1804,19 @@ Returned GQLSTATUS code:: Returned status description:: warn: feature deprecated with replacement. -`shortestPath\((a)-[r]->())` is deprecated. -It is replaced by `shortestPath\((n)-[r*1..1]->(m))`. +`runtime=interpreted` is deprecated. +It is replaced by `runtime=slotted`. Suggestions for improvement:: -If the relationship length is fixed, there is no reason to search for the shortest path. -Instead, you can rewrite it to the following: +Runtime `interpreted` is deprecated and another runtime is used instead. +Alternatively, you can remove the runtime option to use the default runtime. + [source,cypher] ---- -MATCH (a: Start)-[r]->(b: End) RETURN b LIMIT 1 +MATCH (n) RETURN n ---- ====== -===== - -.Using a deprecated runtime option -[.tabbed-example] -===== -[.include-with-neo4j-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1818,13 +1838,18 @@ MATCH (n) RETURN n ---- ====== +===== + +.Using the `text-1.0` index provider when creating a text index +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== Query:: + [source,cypher] ---- -CYPHER runtime = interpreted MATCH (n) RETURN n +CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-1.0'} ---- Returned GQLSTATUS code:: @@ -1832,24 +1857,18 @@ Returned GQLSTATUS code:: Returned status description:: warn: feature deprecated with replacement. -`runtime=interpreted` is deprecated. -It is replaced by `runtime=slotted`. +`text-1.0` is deprecated. +It is replaced by `text-2.0`. Suggestions for improvement:: -Runtime `interpreted` is deprecated and another runtime is used instead. -Alternatively, you can remove the runtime option to use the default runtime. +Update the option `indexProvider` with the value `text-2.0`. + [source,cypher] ---- -MATCH (n) RETURN n +CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-2.0'} ---- ====== -===== - -.Using the `text-1.0` index provider when creating a text index -[.tabbed-example] -===== -[.include-with-neo4j-code] +[.include-with-neo4j--code] ====== Query:: + @@ -1867,17 +1886,550 @@ Update the option `indexProvider` with the value `text-2.0`. + [source,cypher] ---- -CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-2.0'} +CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-2.0'} +---- + +====== +===== + +.Using a renamed or a deprecated procedure +[.tabbed-example] +===== +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +[source,cypher] +---- +CALL cdc.query +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`cdc.query` is deprecated. +It is replaced by `db.cdc.query`. + +====== +[.include-with-GQLSTATUS-deprecated-without-replacement] +====== +[source,cypher] +---- +CALL unsupported.dbms.shutdown +---- + +Returned GQLSTATUS code:: +01N02 + +Returned status description:: +warn: feature deprecated without replacement. +`unsupported.dbms.shutdown` is deprecated and will be removed without a replacement. +====== +[.include-with-neo4j--code] +====== + +[source,cypher] +---- +CALL unsupported.dbms.shutdown +---- + +Description of the returned code:: +The query used a deprecated procedure: `'unsupported.dbms.shutdown'`. + +Suggestions for improvement:: +Remove the use of the deprecated procedure. +If there is a suggested replacement, update to use the replacement instead. + +====== +===== + +.Using id() function +[.tabbed-example] +===== +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a) +RETURN id(a) +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`id` is deprecated. +It is replaced by `elementId()`. + +Suggestions for improvement:: +Use the function `elementId()` instead. ++ +[source,cypher] +---- +MATCH (a) +RETURN elementId(a) +---- +====== +[.include-with-GQLSTATUS-deprecated-without-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a) +RETURN id(a) +---- + +Returned GQLSTATUS code:: +01N02 + +Returned status description:: +warn: feature deprecated without replacement. +`id` is deprecated and will be removed without a replacement. +====== +[.include-with-neo4j--code] +====== + +Query:: ++ +[source,cypher] +---- +MATCH (a) +RETURN id(a) +---- + +Description of the returned code:: +The query used a deprecated function: `id`. + +Suggestions for improvement:: +Use the function `elementId()` instead. ++ +[source,cypher] +---- +MATCH (a) +RETURN elementId(a) +---- +====== +===== + +.Using an unescaped variable named 'where' in a node pattern +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== + +Query:: ++ +[source,cypher] +---- +MATCH (where {p: 5}) +RETURN where +---- + +Description of the returned code:: +'(where {p: 5})' is deprecated. It is replaced by '(++`where`++ {p: 5})'. + +Suggestions for improvement:: +To continue using variables with this name, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH (`where` {p: 5}) +RETURN `where`.p +---- +====== + +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH (where {p: 5}) +RETURN where +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`(where {p: 5})` is deprecated. +It is replaced by `(++`where`++ {p: 5})`. + +Suggestions for improvement:: +To continue using variables with this name, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH (`where` {p: 5}) +RETURN `where`.p +---- +====== +===== + +.Using an unescaped variable named 'where' in a relationship pattern +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH ()-[where {p: 5}]->() +RETURN where +---- + +Description of the returned code:: +'-[where {p: 5}]-' is deprecated. It is replaced by '-[++`where`++ {p: 5}]-'. + +Suggestions for improvement:: +To continue using variables with this name, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH ()-[`where` {p: 5}]->() +RETURN `where`.p +---- +====== + +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH ()-[where {p: 5}]->() +RETURN where +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`-[where {p: 5}]-` is deprecated. +It is replaced by `-[++`where`++ {p: 5}]-`. + +Suggestions for improvement:: +To continue using variables with this name, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH ()-[`where` {p: 5}]->() +RETURN `where`.p +---- +====== +===== + +.Using an unparenthesized label expression predicate as the right-hand side operand of `+` +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH m, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + m:A +---- + +Description of the returned code:: +'... + m:A' is deprecated. It is replaced by '... + (m:A)'. + +Suggestions for improvement:: +Parenthesize the label expression predicate on the right-hand side of `+`: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH m, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + (m:A) +---- +====== + +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH m, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + m:A +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`... + m:A` is deprecated. +It is replaced by `... + (m:A)`. + +Suggestions for improvement:: +Parenthesize the label expression predicate on the right-hand side of `+`: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH m, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + (m:A) +---- +====== +===== + +.Using an unparenthesized label expression predicate as the right-hand side operand of `+` +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH r, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + r:C|D +---- + +Description of the returned code:: +'... + r:C|D' is deprecated. It is replaced by '... + (r:C|D)'. + +Suggestions for improvement:: +Parenthesize the label expression predicate on the right-hand side of `+`: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH r, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + (r:C|D) +---- +====== + +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH r, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + r:C|D +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`... + r:C|D` is deprecated. +It is replaced by `... + (r:C|D)`. + +Suggestions for improvement:: +Parenthesize the label expression predicate on the right-hand side of `+`: ++ +[source,cypher] +---- +MATCH (n)-[r]->(m) +WITH r, n.truthCodes AS listOfBooleans +RETURN listOfBooleans + (r:C|D) +---- +====== +===== + +.Using an unescaped variable named `is` as a `WHEN` operand in a simple `CASE` expression +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (n) +WITH n, n.internationalStandard AS is +RETURN CASE n + WHEN is :: INTEGER THEN "ISO/IEC" + is + ELSE is +END AS standardsName +---- + +Description of the returned code:: +'WHEN is :: INTEGER' is deprecated. It is replaced by 'WHEN ++`is`++ :: INTEGER'. + +Suggestions for improvement:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH (n) +WITH n, n.internationalStandard AS `is` +RETURN CASE n + WHEN `is` :: INTEGER THEN "ISO/IEC" + `is` + ELSE `is` +END AS standardsName +---- +====== +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH (n) +WITH n, n.internationalStandard AS is +RETURN CASE n + WHEN is :: INTEGER THEN "ISO/IEC" + is + ELSE is +END AS standardsName +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`WHEN is pass:[::] INTEGER` is deprecated. +It is replaced by `WHEN ++`is`++ pass:[::] INTEGER`. + +Suggestions for improvement:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH (n) +WITH n, n.internationalStandard AS `is` +RETURN CASE n + WHEN `is` :: INTEGER THEN "ISO/IEC" + `is` + ELSE `is` +END AS standardsName +---- +====== +===== + +.Using an unescaped variable named `contains` in addition operations within a `WHEN` operand in a simple `CASE` expression +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(relationships(p)) AS contains +RETURN CASE size(nodes(p)) + WHEN contains + 1 THEN "okay" + ELSE "not okay" +END AS check +---- + +Description of the returned code:: +'WHEN contains + 1 INTEGER' is deprecated. It is replaced by 'WHEN ++`contains`++ + 1 INTEGER'. + +Suggestions for improvement:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(relationships(p)) AS `contains` +RETURN CASE size(nodes(p)) + WHEN `contains` + 1 THEN "okay" + ELSE "not okay" +END AS check +---- +====== +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== +Query:: ++ +[source,cypher] +---- +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(relationships(p)) AS contains +RETURN CASE size(nodes(p)) + WHEN contains + 1 THEN "okay" + ELSE "not okay" +END AS check +---- + +Returned GQLSTATUS code:: +01N01 + +Returned status description:: +warn: feature deprecated with replacement. +`WHEN contains + 1 INTEGER` is deprecated. +It is replaced by `WHEN ++`contains`++ + 1 INTEGER`. + +Suggestions for improvement:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(relationships(p)) AS `contains` +RETURN CASE size(nodes(p)) + WHEN `contains` + 1 THEN "okay" + ELSE "not okay" +END AS check +---- +====== +===== + +.Using an unescaped variable named `contains` in subtraction operations within a `WHEN` operand in a simple `CASE` expression +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(nodes(p)) AS contains +RETURN CASE size(relationships(p)) + WHEN contains - 1 THEN "okay" + ELSE "not okay" +END AS check +---- + +Description of the returned code:: + +'WHEN contains - 1 INTEGER' is deprecated. It is replaced by 'WHEN ++`contains`++ - 1 INTEGER'. + +Suggestions for improvement:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(nodes(p)) AS `contains` +RETURN CASE size(relationships(p)) + WHEN `contains` - 1 THEN "okay" + ELSE "not okay" +END AS check ---- - ====== -[.include-with-GQLSTATUS-code] +[.include-with-GQLSTATUS-deprecated-with-replacement] ====== Query:: + [source,cypher] ---- -CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-1.0'} +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(nodes(p)) AS contains +RETURN CASE size(relationships(p)) + WHEN contains - 1 THEN "okay" + ELSE "not okay" +END AS check ---- Returned GQLSTATUS code:: @@ -1885,43 +2437,70 @@ Returned GQLSTATUS code:: Returned status description:: warn: feature deprecated with replacement. -`text-1.0` is deprecated. -It is replaced by `text-2.0`. +`WHEN contains - 1 INTEGER` is deprecated. +It is replaced by `WHEN ++`contains`++ - 1 INTEGER`. Suggestions for improvement:: -Update the option `indexProvider` with the value `text-2.0`. +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: + [source,cypher] ---- -CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-2.0'} +MATCH p = (:A)-[:HAS]->(:B) +WITH p, size(nodes(p)) AS `contains` +RETURN CASE size(relationships(p)) + WHEN `contains` - 1 THEN "okay" + ELSE "not okay" +END AS check ---- ====== ===== -.Using a renamed or a deprecated procedure +.Using the `[]` operator on an unescaped variable named `in` within a `WHEN` operand in a simple `CASE` expression [.tabbed-example] ===== [.include-with-neo4j-code] ====== - +Query:: ++ [source,cypher] ---- -CALL unsupported.dbms.shutdown +MATCH (c:Client)-[:MAKES]->(t:Transaction) +WITH t, c.ibanNumbers AS in +RETURN CASE t.ibanNumber + WHEN in[0] THEN "used main account" + ELSE "used different account" +END AS check ---- Description of the returned code:: -The query used a deprecated procedure: `'unsupported.dbms.shutdown'`. -Suggestions for improvement:: -Remove the use of the deprecated procedure. -If there is a suggested replacement, update to use the replacement instead. +'WHEN in[0] INTEGER' is deprecated. It is replaced by 'WHEN ++`in`++[0] INTEGER'. +Suggestions for improvement:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: ++ +[source,cypher] +---- +MATCH (c:Client)-[:MAKES]->(t:Transaction) +WITH t, c.ibanNumbers AS `in` +RETURN CASE t.ibanNumber + WHEN `in`[0] THEN "used main account" + ELSE "used different account" +END AS check +---- ====== [.include-with-GQLSTATUS-deprecated-with-replacement] ====== +Query:: ++ [source,cypher] ---- -CALL cdc.query +MATCH (c:Client)-[:MAKES]->(t:Transaction) +WITH t, c.ibanNumbers AS in +RETURN CASE t.ibanNumber + WHEN in[0] THEN "used main account" + ELSE "used different account" +END AS check ---- Returned GQLSTATUS code:: @@ -1929,50 +2508,54 @@ Returned GQLSTATUS code:: Returned status description:: warn: feature deprecated with replacement. -`cdc.query` is deprecated. -It is replaced by `db.cdc.query`. +`WHEN in[0] INTEGER` is deprecated. +It is replaced by `WHEN ++`in`++[0] INTEGER`. -====== -[.include-with-GQLSTATUS-deprecated-without-replacement] -====== +Suggestions for improvement:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: ++ [source,cypher] ---- -CALL unsupported.dbms.shutdown +MATCH (c:Client)-[:MAKES]->(t:Transaction) +WITH t, c.ibanNumbers AS `in` +RETURN CASE t.ibanNumber + WHEN `in`[0] THEN "used main account" + ELSE "used different account" +END AS check ---- - -Returned GQLSTATUS code:: -01N02 - -Returned status description:: -warn: feature deprecated without replacement. -`unsupported.dbms.shutdown` is deprecated and will be removed without a replacement. ====== ===== -.Using id() function +.Using the `[]` operator on an unescaped variable named `in` within a `WHEN` operand in a simple `CASE` expression [.tabbed-example] ===== [.include-with-neo4j-code] ====== - Query:: + [source,cypher] ---- -MATCH (a) -RETURN id(a) +MATCH (in:Client)-[:MAKES]->(t:Transaction) +RETURN CASE t.ibanNumber + WHEN in["mainAccount"] THEN "used main account" + ELSE "used different account" +END AS check ---- Description of the returned code:: -The query used a deprecated function: `id`. + +'WHEN in["mainAccount"] INTEGER' is deprecated. It is replaced by 'WHEN ++`in`++["mainAccount"] INTEGER'. Suggestions for improvement:: -Use the function `elementId()` instead. +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: + [source,cypher] ---- -MATCH (a) -RETURN elementId(a) +MATCH (in:Client)-[:MAKES]->(t:Transaction) +RETURN CASE t.ibanNumber + WHEN `in`["mainAccount"] THEN "used main account" + ELSE "used different account" +END AS check ---- ====== [.include-with-GQLSTATUS-deprecated-with-replacement] @@ -1981,8 +2564,11 @@ Query:: + [source,cypher] ---- -MATCH (a) -RETURN id(a) +MATCH (in:Client)-[:MAKES]->(t:Transaction) +RETURN CASE t.ibanNumber + WHEN in["mainAccount"] THEN "used main account" + ELSE "used different account" +END AS check ---- Returned GQLSTATUS code:: @@ -1990,34 +2576,20 @@ Returned GQLSTATUS code:: Returned status description:: warn: feature deprecated with replacement. -`id` is deprecated. -It is replaced by `elementId()`. +`WHEN in["mainAccount"] INTEGER` is deprecated. +It is replaced by `WHEN ++`in`++["mainAccount"] INTEGER`. Suggestions for improvement:: -Use the function `elementId()` instead. -+ -[source,cypher] ----- -MATCH (a) -RETURN elementId(a) ----- -====== -[.include-with-GQLSTATUS-deprecated-without-replacement] -====== -Query:: +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: + [source,cypher] ---- -MATCH (a) -RETURN id(a) +MATCH (in:Client)-[:MAKES]->(t:Transaction) +RETURN CASE t.ibanNumber + WHEN `in`["mainAccount"] THEN "used main account" + ELSE "used different account" +END AS check ---- - -Returned GQLSTATUS code:: -01N02 - -Returned status description:: -warn: feature deprecated without replacement. -`id` is deprecated and will be removed without a replacement. ====== ===== @@ -2027,7 +2599,7 @@ warn: feature deprecated without replacement. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.FeatureDeprecationWarning |Title a|This feature is deprecated and will be removed in future versions. @@ -2054,7 +2626,7 @@ m|WARNING .Using Cypher query option `connectComponentsPlanner` [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -2062,13 +2634,15 @@ Query:: ---- CYPHER connectComponentsPlanner=greedy MATCH (a), (b) RETURN * ---- -Description of the returned code:: -The Cypher query option `connectComponentsPlanner` is deprecated and will be removed without a replacement. -The product's default behavior of using a cost-based IDP search algorithm when combining sub-plans will be kept. -For more information, see link:https://neo4j.com/docs/cypher-manual/current/query-tuning/query-options/#cypher-planner[Cypher manual -> Cypher planner]. +Returned GQLSTATUS code:: +01N02 + +Returned status description:: +warn: feature deprecated without replacement. +`connectComponentsPlanner` is deprecated and will be removed without a replacement. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -2076,13 +2650,11 @@ Query:: ---- CYPHER connectComponentsPlanner=greedy MATCH (a), (b) RETURN * ---- +Description of the returned code:: +The Cypher query option `connectComponentsPlanner` is deprecated and will be removed without a replacement. +The product's default behavior of using a cost-based IDP search algorithm when combining sub-plans will be kept. +For more information, see link:https://neo4j.com/docs/cypher-manual/current/query-tuning/query-options/#cypher-planner[Cypher manual -> Cypher planner]. -Returned GQLSTATUS code:: -01N02 - -Returned status description:: -warn: feature deprecated without replacement. -`connectComponentsPlanner` is deprecated and will be removed without a replacement. ====== ===== @@ -2092,7 +2664,7 @@ warn: feature deprecated without replacement. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.FeatureDeprecationWarning |Title a|This feature is deprecated and will be removed in future versions. @@ -2117,7 +2689,7 @@ m|WARNING .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Request.DeprecatedFormat |Title a|The client made a request for a format which has been deprecated. @@ -2149,7 +2721,7 @@ Verify that this is the intended behavior of your query or command. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Security.CommandHasNoEffect |Title a|`` has no effect.* @@ -2177,7 +2749,7 @@ m|INFORMATION .Revoking a role from a user who does not have that role [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Command:: + @@ -2186,16 +2758,18 @@ Command:: REVOKE ROLE admin, reader FROM jane ---- -Title of the returned code:: -`REVOKE ROLE reader FROM jane` has no effect. +Returned GQLSTATUS code:: +00N71 -Description of the returned code:: -The user does not have the role. See Status Codes documentation for more information. +Returned status description:: +note: successful completion - role or privilege not assigned. +`REVOKE ROLE reader FROM jane` has no effect. +The role or privilege is not assigned. Suggestions for improvement:: Verify that this is the intended role and user. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Command:: + @@ -2204,13 +2778,11 @@ Command:: REVOKE ROLE admin, reader FROM jane ---- -Returned GQLSTATUS code:: -00N71 - -Returned status description:: -note: successful completion - role or privilege not assigned. +Title of the returned code:: `REVOKE ROLE reader FROM jane` has no effect. -The role or privilege is not assigned. + +Description of the returned code:: +The user does not have the role. See Status Codes documentation for more information. Suggestions for improvement:: Verify that this is the intended role and user. @@ -2220,8 +2792,9 @@ Verify that this is the intended role and user. .Revoking a privilege from a role that does not have that privilege [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== + Command:: + [source, cypher] @@ -2229,18 +2802,20 @@ Command:: REVOKE WRITE ON GRAPH * FROM reader ---- -Title of the returned code:: -`REVOKE DENY WRITE ON GRAPH * FROM reader` has no effect. +Returned GQLSTATUS code:: +00N71 -Description of the returned code:: -The role does not have the privilege. See Status Codes documentation for more information. +Returned status description:: +note: successful completion - role or privilege not assigned. +`REVOKE DENY WRITE ON GRAPH * FROM reader` has no effect. +The role or privilege is not assigned. Suggestions for improvement:: Verify that this is the intended privilege and role. + ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== - Command:: + [source, cypher] @@ -2248,17 +2823,14 @@ Command:: REVOKE WRITE ON GRAPH * FROM reader ---- -Returned GQLSTATUS code:: -00N71 - -Returned status description:: -note: successful completion - role or privilege not assigned. +Title of the returned code:: `REVOKE DENY WRITE ON GRAPH * FROM reader` has no effect. -The role or privilege is not assigned. + +Description of the returned code:: +The role does not have the privilege. See Status Codes documentation for more information. Suggestions for improvement:: Verify that this is the intended privilege and role. - ====== ===== @@ -2269,7 +2841,7 @@ Verify that this is the intended privilege and role. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Security.CommandHasNoEffect |Title a|`` has no effect.* @@ -2297,7 +2869,7 @@ m|INFORMATION .Granting a role to a user who already has that role [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Command:: + @@ -2305,17 +2877,20 @@ Command:: ---- GRANT ROLE admin TO john ---- -Title of the returned code:: -`GRANT ROLE admin TO john` has no effect. -Description of the returned code:: -The user already has the role. See Status Codes documentation for more information. +Returned GQLSTATUS code:: +00N70 + +Returned status description:: +note: successful completion - role or privilege already assigned. +`GRANT ROLE admin TO john` has no effect. +The role or privilege is already assigned. Suggestions for improvement:: Verify that this is the intended role and user. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Command:: + @@ -2323,14 +2898,11 @@ Command:: ---- GRANT ROLE admin TO john ---- - -Returned GQLSTATUS code:: -00N70 - -Returned status description:: -note: successful completion - role or privilege already assigned. +Title of the returned code:: `GRANT ROLE admin TO john` has no effect. -The role or privilege is already assigned. + +Description of the returned code:: +The user already has the role. See Status Codes documentation for more information. Suggestions for improvement:: Verify that this is the intended role and user. @@ -2343,7 +2915,7 @@ Verify that this is the intended role and user. // This command returns 2 notifications, one for NODES and one for RELATIONSHIPS. [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Command:: + @@ -2352,17 +2924,18 @@ Command:: GRANT TRAVERSE ON GRAPH * TO reader ---- -Title of the returned code:: -`GRANT TRAVERSE ON GRAPH * NODE * TO reader` has no effect. +Returned GQLSTATUS code:: +00N70 -Description of the returned code:: -The role already has the privilege. See Status Codes documentation for more information. +Returned status description:: +note: successful completion - role or privilege already assigned. +`GRANT TRAVERSE ON GRAPH * TO reader` has no effect. +The role or privilege is already assigned. Suggestions for improvement:: Verify that this is the intended privilege and role. - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Command:: + @@ -2371,16 +2944,15 @@ Command:: GRANT TRAVERSE ON GRAPH * TO reader ---- -Returned GQLSTATUS code:: -00N70 +Title of the returned code:: +`GRANT TRAVERSE ON GRAPH * NODE * TO reader` has no effect. -Returned status description:: -note: successful completion - role or privilege already assigned. -`GRANT TRAVERSE ON GRAPH * TO reader` has no effect. -The role or privilege is already assigned. +Description of the returned code:: +The role already has the privilege. See Status Codes documentation for more information. Suggestions for improvement:: Verify that this is the intended privilege and role. + ====== ===== @@ -2392,7 +2964,7 @@ Verify that this is the intended privilege and role. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Security.ImpossibleRevokeCommand |Title a|`` has no effect.* @@ -2419,26 +2991,6 @@ m|WARNING .Revoking a non-existing role from a user [.tabbed-example] ===== -[.include-with-neo4j-code] -====== -Command:: -+ -[source, cypher] ----- -REVOKE ROLE manager, reader FROM jane ----- - -Title of the returned code:: -`REVOKE ROLE manager FROM jane` has no effect. - -Description of the returned code:: -Role does not exist. Make sure nothing is misspelled. -This notification will become an error in a future major version. -See Status Codes documentation for more information. - -Suggestions for improvement:: -Verify that this is the intended role and that it is spelled correctly. -====== [.include-with-GQLSTATUS-code] ====== Command:: @@ -2461,31 +3013,31 @@ This notification will become an error in a future major version. Suggestions for improvement:: Verify that this is the intended role and that it is spelled correctly. ====== -===== - -.Revoking a role from a non-existing user -[.tabbed-example] -===== -[.include-with-neo4j-code] +[.include-with-neo4j--code] ====== Command:: + [source, cypher] ---- -REVOKE ROLE reader FROM alice +REVOKE ROLE manager, reader FROM jane ---- Title of the returned code:: -`REVOKE ROLE reader FROM alice` has no effect. +`REVOKE ROLE manager FROM jane` has no effect. Description of the returned code:: -User does not exist. -Make sure nothing is misspelled. +Role does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. +See Status Codes documentation for more information. Suggestions for improvement:: -Verify that this is the intended user and that it is spelled correctly. +Verify that this is the intended role and that it is spelled correctly. ====== +===== + +.Revoking a role from a non-existing user +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== @@ -2505,37 +3057,37 @@ warn: impossible revoke command. User does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. -See Status Codes documentation for more information. -o -Suggestions for improvement:: -Verify that this is the intended user and that it is spelled correctly. -====== -===== - - -.Revoking a privilege from a non-existing role -[.tabbed-example] -===== -[.include-with-neo4j-code] +See Status Codes documentation for more information. +o +Suggestions for improvement:: +Verify that this is the intended user and that it is spelled correctly. +====== +[.include-with-neo4j--code] ====== Command:: + [source, cypher] ---- -REVOKE GRANT WRITE ON GRAPH * FROM manager +REVOKE ROLE reader FROM alice ---- Title of the returned code:: -`REVOKE GRANT WRITE ON GRAPH * FROM manager` has no effect. +`REVOKE ROLE reader FROM alice` has no effect. Description of the returned code:: -Role does not exist. Make sure nothing is misspelled. +User does not exist. +Make sure nothing is misspelled. This notification will become an error in a future major version. -See Status Codes documentation for more information. Suggestions for improvement:: -Verify that this is the intended role and that it is spelled correctly. +Verify that this is the intended user and that it is spelled correctly. ====== +===== + + +.Revoking a privilege from a non-existing role +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== @@ -2559,31 +3111,31 @@ This notification will become an error in a future major version. Suggestions for improvement:: Verify that this is the intended role and that it is spelled correctly. ====== -===== - -.Revoking a privilege on a non-existing graph from a role -[.tabbed-example] -===== -[.include-with-neo4j-code] +[.include-with-neo4j--code] ====== Command:: + [source, cypher] ---- -REVOKE GRANT WRITE ON GRAPH neo3j FROM editor +REVOKE GRANT WRITE ON GRAPH * FROM manager ---- Title of the returned code:: -`REVOKE GRANT WRITE ON GRAPH neo3j FROM editor` has no effect. +`REVOKE GRANT WRITE ON GRAPH * FROM manager` has no effect. Description of the returned code:: -Database `neo3j` does not exist. Make sure nothing is misspelled. +Role does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information. Suggestions for improvement:: -Verify that this is the intended graph and that it is spelled correctly. +Verify that this is the intended role and that it is spelled correctly. ====== +===== + +.Revoking a privilege on a non-existing graph from a role +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== Command:: @@ -2606,22 +3158,17 @@ This notification will become an error in a future major version. Suggestions for improvement:: Verify that this is the intended graph and that it is spelled correctly. ====== -===== - -.Revoking a privilege on a non-existing database from a role -[.tabbed-example] -===== -[.include-with-neo4j-code] +[.include-with-neo4j--code] ====== Command:: + [source, cypher] ---- -REVOKE GRANT ACCESS ON DATABASE neo3j FROM editor +REVOKE GRANT WRITE ON GRAPH neo3j FROM editor ---- Title of the returned code:: -`REVOKE GRANT ACCESS ON DATABASE neo3j FROM editor` has no effect. +`REVOKE GRANT WRITE ON GRAPH neo3j FROM editor` has no effect. Description of the returned code:: Database `neo3j` does not exist. Make sure nothing is misspelled. @@ -2629,8 +3176,13 @@ This notification will become an error in a future major version. See Status Codes documentation for more information. Suggestions for improvement:: -Verify that this is the intended database and that it is spelled correctly. +Verify that this is the intended graph and that it is spelled correctly. ====== +===== + +.Revoking a privilege on a non-existing database from a role +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== Command:: @@ -2654,41 +3206,32 @@ Suggestions for improvement:: Verify that this is the intended database and that it is spelled correctly. ====== -===== - - -.Revoking a privilege from a role with wildcard graph parameter -[.tabbed-example] -===== -[.include-with-neo4j-code] +[.include-with-neo4j--code] ====== -Parameter:: -+ -[source, javascript] ----- -{ - "graph": "*" -} ----- Command:: + [source, cypher] ---- -REVOKE GRANT CREATE ON GRAPH $graph FROM PUBLIC +REVOKE GRANT ACCESS ON DATABASE neo3j FROM editor ---- Title of the returned code:: -`REVOKE GRANT CREATE ON GRAPH $graph FROM PUBLIC` has no effect. +`REVOKE GRANT ACCESS ON DATABASE neo3j FROM editor` has no effect. Description of the returned code:: -Parameterized database and graph names do not support wildcards. -Make sure nothing is misspelled. +Database `neo3j` does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information. Suggestions for improvement:: -Use `GRAPH *` without the parameter to revoke the privilege on all graphs. +Verify that this is the intended database and that it is spelled correctly. ====== +===== + + +.Revoking a privilege from a role with wildcard graph parameter +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== Parameter:: @@ -2721,30 +3264,25 @@ Use `GRAPH *` without the parameter to revoke the privilege on all graphs. ====== -===== - -.Revoking a privilege from a role with a wildcard database parameter -[.tabbed-example] -===== -[.include-with-neo4j-code] +[.include-with-neo4j--code] ====== Parameter:: + [source, javascript] ---- { - "database": "*" + "graph": "*" } ---- Command:: + [source, cypher] ---- -REVOKE GRANT ACCESS ON DATABASE $database FROM PUBLIC +REVOKE GRANT CREATE ON GRAPH $graph FROM PUBLIC ---- Title of the returned code:: -`REVOKE GRANT ACCESS ON DATABASE $database FROM PUBLIC` has no effect. +`REVOKE GRANT CREATE ON GRAPH $graph FROM PUBLIC` has no effect. Description of the returned code:: Parameterized database and graph names do not support wildcards. @@ -2753,8 +3291,13 @@ This notification will become an error in a future major version. See Status Codes documentation for more information. Suggestions for improvement:: -Use `DATABASE *` without the parameter to revoke the privilege on all databases. +Use `GRAPH *` without the parameter to revoke the privilege on all graphs. ====== +===== + +.Revoking a privilege from a role with a wildcard database parameter +[.tabbed-example] +===== [.include-with-GQLSTATUS-code] ====== @@ -2786,6 +3329,35 @@ This notification will become an error in a future major version. Suggestions for improvement:: Use `DATABASE *` without the parameter to revoke the privilege on all databases. +====== +[.include-with-neo4j--code] +====== +Parameter:: ++ +[source, javascript] +---- +{ + "database": "*" +} +---- +Command:: ++ +[source, cypher] +---- +REVOKE GRANT ACCESS ON DATABASE $database FROM PUBLIC +---- + +Title of the returned code:: +`REVOKE GRANT ACCESS ON DATABASE $database FROM PUBLIC` has no effect. + +Description of the returned code:: +Parameterized database and graph names do not support wildcards. +Make sure nothing is misspelled. +This notification will become an error in a future major version. +See Status Codes documentation for more information. + +Suggestions for improvement:: +Use `DATABASE *` without the parameter to revoke the privilege on all databases. ====== ===== @@ -2795,7 +3367,7 @@ Use `DATABASE *` without the parameter to revoke the privilege on all databases. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Security.AuthProviderNotDefined |Title a|The auth provider is not defined. @@ -2911,7 +3483,7 @@ If it is correct, make sure to add it as a known auth provider in one or both of .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Security.ExternalAuthNotEnabled |Title a|External auth for user is not enabled. @@ -3022,7 +3594,7 @@ Topology notifications provide additional information related to managing databa .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Cluster.ServerAlreadyEnabled |Title a| `` has no effect. @@ -3047,7 +3619,7 @@ m|INFORMATION .Enabling an already enabled server [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Command:: + @@ -3056,12 +3628,17 @@ Command:: ENABLE SERVER "123e4567-e89b-12d3-a456-426614174000" ---- -Description of the returned code:: +Returned GQLSTATUS code:: +00N80 + +Returned status description:: +note: successful completion - server already enabled. +`ENABLE SERVER` has no effect. Server `123e4567-e89b-12d3-a456-426614174000` is already enabled. Verify that this is the intended server. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Command:: + @@ -3070,12 +3647,7 @@ Command:: ENABLE SERVER "123e4567-e89b-12d3-a456-426614174000" ---- -Returned GQLSTATUS code:: -00N80 - -Returned status description:: -note: successful completion - server already enabled. -`ENABLE SERVER` has no effect. +Description of the returned code:: Server `123e4567-e89b-12d3-a456-426614174000` is already enabled. Verify that this is the intended server. @@ -3088,7 +3660,7 @@ Verify that this is the intended server. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Cluster.ServerAlreadyCordoned |Title a| `` has no effect. @@ -3113,7 +3685,7 @@ m|INFORMATION .Cordoning an already cordoned server [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Command:: + @@ -3122,12 +3694,17 @@ Command:: CORDON SERVER "123e4567-e89b-12d3-a456-426614174000" ---- -Description of the returned code:: +Returned GQLSTATUS code:: +00N81 + +Returned status description:: +note: successful completion - server already cordoned. +`CORDON SERVER` has no effect. Server `123e4567-e89b-12d3-a456-426614174000` is already cordoned. Verify that this is the intended server. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Command:: + @@ -3136,12 +3713,7 @@ Command:: CORDON SERVER "123e4567-e89b-12d3-a456-426614174000" ---- -Returned GQLSTATUS code:: -00N81 - -Returned status description:: -note: successful completion - server already cordoned. -`CORDON SERVER` has no effect. +Description of the returned code:: Server `123e4567-e89b-12d3-a456-426614174000` is already cordoned. Verify that this is the intended server. @@ -3154,7 +3726,7 @@ Verify that this is the intended server. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Cluster.NoDatabasesReallocated |Title a| `` has no effect. @@ -3178,7 +3750,7 @@ m|INFORMATION .Reallocating databases resulted in no allocation changes [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Command:: + @@ -3187,9 +3759,14 @@ Command:: REALLOCATE DATABASES ---- -Description of the returned code:: -No databases were reallocated. No better allocation is currently possible. +Returned GQLSTATUS code:: +00N82 +Returned status description:: +note: successful completion - no databases reallocated. +`REALLOCATE DATABASES` has no effect. +No databases were reallocated. +No better allocation is currently possible. Example scenarios:: **Scenario 1:** The cluster is already balanced. @@ -3200,7 +3777,7 @@ For example, when there are three servers, each hosting databases `foo` and `bar For example, assuming server 1 hosts databases `foo` and `bar`, server 2 hosts only `foo`, and server 3 hosts no databases. Then, a better allocation would move `foo` from server 1 to server 3, but if server 3 has the constraint `deniedDatabases:['foo']}`, then the cluster is already balanced subject to this constraint. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Command:: + @@ -3209,14 +3786,9 @@ Command:: REALLOCATE DATABASES ---- -Returned GQLSTATUS code:: -00N82 +Description of the returned code:: +No databases were reallocated. No better allocation is currently possible. -Returned status description:: -note: successful completion - no databases reallocated. -`REALLOCATE DATABASES` has no effect. -No databases were reallocated. -No better allocation is currently possible. Example scenarios:: **Scenario 1:** The cluster is already balanced. @@ -3238,7 +3810,7 @@ For example, `CREATE DATABASE`, `ALTER DATABASE`, `DEALLOCATE DATABASES FROM SER .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Cluster.CordonedServersExistedDuringAllocation |Title a| Cordoned servers existed when making an allocation decision. @@ -3262,7 +3834,7 @@ m|INFORMATION .Cordoned servers existed during an allocation decision [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== The example assumes that you have a cluster with three servers, of which server `123e4567-e89b-12d3-a456-426614174000` is cordoned using the `dbms.cluster.cordonServer` procedure. Then the below command will return this notification. @@ -3273,10 +3845,16 @@ Command:: CREATE DATABASE foo TOPOLOGY 2 PRIMARIES ---- -Description of the returned code:: -Server(s) `123e4567-e89b-12d3-a456-426614174000` are cordoned. This can impact allocation decisions. +Returned GQLSTATUS code:: +00N83 + +Returned status description:: +note: successful completion - cordoned servers existed during allocation. +Cordoned servers existed when making an allocation decision. +Server(s) `123e4567-e89b-12d3-a456-426614174000` are cordoned. +This can impact allocation decisions. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== The example assumes that you have a cluster with three servers, of which server `123e4567-e89b-12d3-a456-426614174000` is cordoned using the `dbms.cluster.cordonServer` procedure. Then the below command will return this notification. @@ -3287,14 +3865,8 @@ Command:: CREATE DATABASE foo TOPOLOGY 2 PRIMARIES ---- -Returned GQLSTATUS code:: -00N83 - -Returned status description:: -note: successful completion - cordoned servers existed during allocation. -Cordoned servers existed when making an allocation decision. -Server(s) `123e4567-e89b-12d3-a456-426614174000` are cordoned. -This can impact allocation decisions. +Description of the returned code:: +Server(s) `123e4567-e89b-12d3-a456-426614174000` are cordoned. This can impact allocation decisions. ====== ===== @@ -3305,7 +3877,7 @@ This can impact allocation decisions. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Cluster.RequestedTopologyMatchedCurrentTopology |Title a| `` has no effect. @@ -3330,7 +3902,7 @@ m|INFORMATION .Requested topology matched current topology [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== The example assumes that you have a cluster with three servers and a database `foo` with a topology of two primaries and one secondary. @@ -3341,10 +3913,17 @@ Command:: ALTER DATABASE foo SET TOPOLOGY 2 PRIMARIES 1 SECONDARY ---- -Description of the returned code:: -The requested topology matched the current topology. No allocations were changed. +Returned GQLSTATUS code:: +00N84 + +Returned status description:: +note: successful completion - requested topology matched current topology. +`ALTER DATABASE` has no effect. +The requested topology matched the current topology. +No allocations were changed. + ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== The example assumes that you have a cluster with three servers and a database `foo` with a topology of two primaries and one secondary. @@ -3355,15 +3934,8 @@ Command:: ALTER DATABASE foo SET TOPOLOGY 2 PRIMARIES 1 SECONDARY ---- -Returned GQLSTATUS code:: -00N84 - -Returned status description:: -note: successful completion - requested topology matched current topology. -`ALTER DATABASE` has no effect. -The requested topology matched the current topology. -No allocations were changed. - +Description of the returned code:: +The requested topology matched the current topology. No allocations were changed. ====== ===== @@ -3378,7 +3950,7 @@ Schema notifications provide additional information related to indexes and const .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Schema.IndexOrConstraintAlreadyExists |Title a|`` has no effect. @@ -3403,7 +3975,7 @@ m|INFORMATION .Creating an index when an equivalent index already exists [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Given a range index on `(:Label \{property})` named `existingRangeIndex`. @@ -3414,14 +3986,16 @@ Command:: CREATE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (n:Label) ON (n.property) ---- -Title of the returned code:: -`CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property)` has no effect. +Returned GQLSTATUS code:: +00NA0 -Full description of the returned code:: +Returned status description:: +note: successful completion - index or constraint already exists. +`CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property)` has no effect. `RANGE INDEX existingRangeIndex FOR (e:Label) ON (e.property)` already exists. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Given a range index on `(:Label \{property})` named `existingRangeIndex`. @@ -3432,12 +4006,10 @@ Command:: CREATE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (n:Label) ON (n.property) ---- -Returned GQLSTATUS code:: -00NA0 - -Returned status description:: -note: successful completion - index or constraint already exists. +Title of the returned code:: `CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property)` has no effect. + +Full description of the returned code:: `RANGE INDEX existingRangeIndex FOR (e:Label) ON (e.property)` already exists. ====== @@ -3446,7 +4018,7 @@ note: successful completion - index or constraint already exists. .Creating an index when another unrelated index using that name already exists [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Given a range index on `(:Label \{property})` named `myIndex`. @@ -3457,10 +4029,12 @@ Command:: CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) ---- -Title of the returned code:: -`CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property)` has no effect. +Returned GQLSTATUS code:: +00NA0 -Full description of the returned code:: +Returned status description:: +note: successful completion - index or constraint already exists. +`CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property)` has no effect. `RANGE INDEX myIndex FOR (e:Label) ON (e.property)` already exists. Suggestions for improvement:: @@ -3472,7 +4046,7 @@ CREATE TEXT INDEX myIndex2 IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Given a range index on `(:Label \{property})` named `myIndex`. @@ -3483,12 +4057,10 @@ Command:: CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) ---- -Returned GQLSTATUS code:: -00NA0 - -Returned status description:: -note: successful completion - index or constraint already exists. +Title of the returned code:: `CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property)` has no effect. + +Full description of the returned code:: `RANGE INDEX myIndex FOR (e:Label) ON (e.property)` already exists. Suggestions for improvement:: @@ -3505,7 +4077,7 @@ CREATE TEXT INDEX myIndex2 IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) .Creating a constraint when an identical constraint already exists [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Given a node key constraint on `(:Label \{property})` named `nodeKeyLabelPropertyConstraint`. @@ -3516,14 +4088,16 @@ Command:: CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (n:Label) REQUIRE (n.property) IS NODE KEY ---- -Title of the returned code:: -`CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY` has no effect. +Returned GQLSTATUS code:: +00NA0 -Full description of the returned code:: +Returned status description:: +note: successful completion - index or constraint already exists. +`CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY` has no effect. `CONSTRAINT nodeKeyLabelPropertyConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Given a node key constraint on `(:Label \{property})` named `nodeKeyLabelPropertyConstraint`. @@ -3534,12 +4108,10 @@ Command:: CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (n:Label) REQUIRE (n.property) IS NODE KEY ---- -Returned GQLSTATUS code:: -00NA0 - -Returned status description:: -note: successful completion - index or constraint already exists. +Title of the returned code:: `CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY` has no effect. + +Full description of the returned code:: `CONSTRAINT nodeKeyLabelPropertyConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. ====== @@ -3549,7 +4121,7 @@ note: successful completion - index or constraint already exists. .Creating a constraint when another unrelated constraint using that name already exists [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Given a node key constraint on `(:Label \{property})` named `myConstraint`. @@ -3560,10 +4132,12 @@ Command:: CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ---- -Title of the returned code:: -`CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL` has no effect. +Returned GQLSTATUS code:: +00NA0 -Full description of the returned code:: +Returned status description:: +note: successful completion - index or constraint already exists. +`CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL` has no effect. `CONSTRAINT myConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. Suggestions for improvement:: @@ -3575,7 +4149,7 @@ CREATE CONSTRAINT myConstraint2 IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Given a node key constraint on `(:Label \{property})` named `myConstraint`. @@ -3586,12 +4160,10 @@ Command:: CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ---- -Returned GQLSTATUS code:: -00NA0 - -Returned status description:: -note: successful completion - index or constraint already exists. +Title of the returned code:: `CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL` has no effect. + +Full description of the returned code:: `CONSTRAINT myConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. Suggestions for improvement:: @@ -3611,7 +4183,7 @@ CREATE CONSTRAINT myConstraint2 IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Schema.IndexOrConstraintDoesNotExist |Title a|`` has no effect. @@ -3632,9 +4204,8 @@ m|INFORMATION .Attempting to drop a non-existing index [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== - Command:: + [source, cypher] @@ -3642,18 +4213,21 @@ Command:: DROP INDEX nonExistingIndex IF EXISTS ---- -Title of the returned code:: -`DROP INDEX nonExistingIndex IF EXISTS` has no effect. +Returned GQLSTATUS code:: +00NA1 -Full description of the returned code:: +Returned status description:: +note: successful completion - index or constraint does not exist. +`DROP INDEX nonExistingIndex IF EXISTS` has no effect. `nonExistingIndex` does not exist. Suggestions for improvement:: Verify that this is the intended index and that it is spelled correctly. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== + Command:: + [source, cypher] @@ -3661,12 +4235,10 @@ Command:: DROP INDEX nonExistingIndex IF EXISTS ---- -Returned GQLSTATUS code:: -00NA1 - -Returned status description:: -note: successful completion - index or constraint does not exist. +Title of the returned code:: `DROP INDEX nonExistingIndex IF EXISTS` has no effect. + +Full description of the returned code:: `nonExistingIndex` does not exist. Suggestions for improvement:: @@ -3678,9 +4250,8 @@ Verify that this is the intended index and that it is spelled correctly. .Attempting to drop a non-existing constraint [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== - Command:: + [source, cypher] @@ -3688,18 +4259,21 @@ Command:: DROP CONSTRAINT nonExistingConstraint IF EXISTS ---- -Title of the returned code:: -`DROP CONSTRAINT nonExistingConstraint IF EXISTS` has no effect. +Returned GQLSTATUS code:: +00NA1 -Full description of the returned code:: +Returned status description:: +note: successful completion - index or constraint does not exist. +`DROP CONSTRAINT nonExistingConstraint IF EXISTS` has no effect. `nonExistingConstraint` does not exist. Suggestions for improvement:: Verify that this is the intended constraint and that it is spelled correctly. ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== + Command:: + [source, cypher] @@ -3707,12 +4281,10 @@ Command:: DROP CONSTRAINT nonExistingConstraint IF EXISTS ---- -Returned GQLSTATUS code:: -00NA1 - -Returned status description:: -note: successful completion - index or constraint does not exist. +Title of the returned code:: `DROP CONSTRAINT nonExistingConstraint IF EXISTS` has no effect. + +Full description of the returned code:: `nonExistingConstraint` does not exist. Suggestions for improvement:: @@ -3732,7 +4304,7 @@ Verify that this is the intended constraint and that it is spelled correctly. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.SubqueryVariableShadowing |Title a|Variable in subquery is shadowing a variable with the same name from the outer scope. @@ -3756,7 +4328,7 @@ m|INFORMATION .Shadowing of a variable from the outer scope [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -3770,9 +4342,13 @@ CALL { RETURN * ---- -Description of the returned code:: -Variable in subquery is shadowing a variable with the same name from the outer scope. -If you want to use that variable instead, it must be imported into the subquery using importing `WITH` clause. (the shadowing variable is: `n`) +Returned GQLSTATUS code:: +03N60 + +Returned status description:: +info: subquery variable shadowing. +The variable `n` in the subquery uses the same name as a variable from the outer query. +Use `WITH n` in the subquery to import the one from the outer scope unless you want it to be a new variable. Suggestions for improvement:: If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. @@ -3789,7 +4365,7 @@ CALL { RETURN * ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -3803,13 +4379,9 @@ CALL { RETURN * ---- -Returned GQLSTATUS code:: -03N60 - -Returned status description:: -info: subquery variable shadowing. -The variable `n` in the subquery uses the same name as a variable from the outer query. -Use `WITH n` in the subquery to import the one from the outer scope unless you want it to be a new variable. +Description of the returned code:: +Variable in subquery is shadowing a variable with the same name from the outer scope. +If you want to use that variable instead, it must be imported into the subquery using importing `WITH` clause. (the shadowing variable is: `n`) Suggestions for improvement:: If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. @@ -3834,7 +4406,7 @@ RETURN * .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.RedundantOptionalProcedure |Title a|The use of `OPTIONAL` is redundant when the procedure calls a void procedure. @@ -3855,7 +4427,7 @@ m|INFORMATION .Redundant use of `OPTIONAL` in a procedure call [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -3863,9 +4435,11 @@ Query:: ---- OPTIONAL CALL db.createLabel("A") ---- +Returned GQLSTATUS code:: +03N61 -Description of the returned code:: -The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. +Returned status description:: +info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. Suggestions for improvement:: If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. @@ -3875,7 +4449,7 @@ If the intended behavior of the query is to use a void procedure, the `OPTIONAL` CALL db.createLabel("A") ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -3883,11 +4457,9 @@ Query:: ---- OPTIONAL CALL db.createLabel("A") ---- -Returned GQLSTATUS code:: -03N61 -Returned status description:: -info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. +Description of the returned code:: +The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. Suggestions for improvement:: If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. @@ -3905,7 +4477,7 @@ CALL db.createLabel("A") .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.RedundantOptionalSubquery |Title a|The use of `OPTIONAL` is redundant when `CALL` is a unit subquery. @@ -3926,7 +4498,7 @@ m|INFORMATION .Redundant use of `OPTIONAL` in a `CALL` subquery [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -3938,8 +4510,11 @@ OPTIONAL CALL (x) { } ---- +Returned GQLSTATUS code:: +03N62 + Description of the returned code:: -Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed. +info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. Suggestions for improvement:: If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query. @@ -3952,7 +4527,7 @@ CALL (x) { } ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -3964,11 +4539,8 @@ OPTIONAL CALL (x) { } ---- -Returned GQLSTATUS code:: -03N62 - Description of the returned code:: -info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. +Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed. Suggestions for improvement:: If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query. @@ -3989,7 +4561,7 @@ CALL (x) { .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.ParameterNotProvided |Title a|The statement refers to a parameter that was not provided in the request. @@ -4014,7 +4586,7 @@ m|WARNING .Using an `EXPLAIN` query with parameters without providing them [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -4024,15 +4596,18 @@ EXPLAIN WITH $param as param RETURN param ---- -Description of the returned code:: -Did not supply query with enough parameters. -The produced query plan will not be cached and is not executable without `EXPLAIN`. (Missing parameters: `param`) +Returned GQLSTATUS code:: +01N60 + +Returned status description:: +warn: parameter missing. +The query plan cannot be cached and is not executable without `EXPLAIN` due to the undefined parameter(s) `{ $param }`. +Provide the parameter(s). Suggestions for improvement:: Provide the parameter to be able to cache the plan. - ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -4042,16 +4617,13 @@ EXPLAIN WITH $param as param RETURN param ---- -Returned GQLSTATUS code:: -01N60 - -Returned status description:: -warn: parameter missing. -The query plan cannot be cached and is not executable without `EXPLAIN` due to the undefined parameter(s) `{ $param }`. -Provide the parameter(s). +Description of the returned code:: +Did not supply query with enough parameters. +The produced query plan will not be cached and is not executable without `EXPLAIN`. (Missing parameters: `param`) Suggestions for improvement:: Provide the parameter to be able to cache the plan. + ====== ===== @@ -4062,7 +4634,7 @@ Provide the parameter to be able to cache the plan. .Notification details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Procedure.ProcedureWarning |Title a|The query used a procedure that generated a warning. @@ -4091,7 +4663,7 @@ When matching on a relationship type expression that can never be satisfied, for .Notification category details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.UnsatisfiableRelationshipTypeExpression |Title a|The query contains a relationship type expression that cannot be satisfied. @@ -4114,17 +4686,6 @@ m|WARNING .Matching on a relationship type expression that can never be satisfied [.tabbed-example] ===== -[.include-with-neo4j-code] -====== -Query:: -+ -[source,cypher] ----- -MATCH ()-[r:R1&R2]->() RETURN r ----- -Description of the returned code:: -Relationship type expression cannot possibly be satisfied. (`R1&R2` can never be fulfilled by any relationship. Relationships must have exactly one type.) -====== [.include-with-GQLSTATUS-code] ====== Query:: @@ -4141,6 +4702,17 @@ Returned status description:: warn: unsatisfiable relationship type expression. The expression `R1&R2` cannot be satisfied because relationships must have exactly one type. ====== +[.include-with-neo4j--code] +====== +Query:: ++ +[source,cypher] +---- +MATCH ()-[r:R1&R2]->() RETURN r +---- +Description of the returned code:: +Relationship type expression cannot possibly be satisfied. (`R1&R2` can never be fulfilled by any relationship. Relationships must have exactly one type.) +====== ===== [role=label--new-5.5] @@ -4150,7 +4722,7 @@ The expression `R1&R2` cannot be satisfied because relationships must have exact .Notification category details [cols="<1s,<4"] |=== -|Neo4j code +|Neo4j code m|Neo.ClientNotification.Statement.RepeatedRelationshipReference |Title a|The query returns no results because a relationship variable is bound more than once. @@ -4175,7 +4747,7 @@ m|WARNING .Binding a relationship variable more than once [.tabbed-example] ===== -[.include-with-neo4j-code] +[.include-with-GQLSTATUS-code] ====== Query:: + @@ -4183,8 +4755,13 @@ Query:: ---- MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r ---- -Description of the returned code:: -A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (Relationship `r` was repeated) + +Returned GQLSTATUS code:: +01N63 + +Returned status description:: +warn: repeated relationship reference. +`r` is repeated in `(:A)-[r]->(), ()-[r]->(:B)`, which leads to no results. Suggestions for improvement:: Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`: @@ -4194,7 +4771,7 @@ Use one pattern to match all relationships that start with a node with the label MATCH (:A)-[r]->(:B) RETURN r ---- ====== -[.include-with-GQLSTATUS-code] +[.include-with-neo4j--code] ====== Query:: + @@ -4202,13 +4779,8 @@ Query:: ---- MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r ---- - -Returned GQLSTATUS code:: -01N63 - -Returned status description:: -warn: repeated relationship reference. -`r` is repeated in `(:A)-[r]->(), ()-[r]->(:B)`, which leads to no results. +Description of the returned code:: +A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (Relationship `r` was repeated) Suggestions for improvement:: Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`: @@ -4223,18 +4795,6 @@ MATCH (:A)-[r]->(:B) RETURN r .Binding a variable-length relationship variable more than once (when run on version 5.6 or newer) [.tabbed-example] ===== -[.include-with-neo4j-code] -====== -Query:: -+ -[source,cypher] ----- -MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count ----- -Description of the returned code:: -A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated) -====== - [.include-with-GQLSTATUS-code] ====== Query:: @@ -4251,4 +4811,15 @@ Returned status description:: warn: repeated relationship reference. `r` is repeated in `()-[r*]->()<-[r*]-()`, which leads to no results. ====== -===== +[.include-with-neo4j--code] +====== +Query:: ++ +[source,cypher] +---- +MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count +---- +Description of the returned code:: +A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated) +====== +===== \ No newline at end of file diff --git a/modules/ROOT/pages/notifications/index.adoc b/modules/ROOT/pages/notifications/index.adoc index a70e0392..7e19ccf3 100644 --- a/modules/ROOT/pages/notifications/index.adoc +++ b/modules/ROOT/pages/notifications/index.adoc @@ -1,65 +1,36 @@ -:description: The Neo4j notifications for Neo4j version {neo4j-version}. +:description: Server notifications for Neo4j version {neo4j-version}. [[notifications]] = Server notifications -After a successful query execution, the Neo4j server sends notifications to provide advice on how to improve the query's quality or give additional information about the query execution. -The driver receives these notifications and sends them to the client, which displays them to the user. +After a successful query execution, the Neo4j server sends notifications to give additional information about the query execution or provide advice on how to improve the query's quality. +The driver receives these notifications and sends them to the Neo4j tools (e.g. Browser, Bloom, Cypher Shell) or the user application, which display them to the user. -From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API. -The GqlStatusObject API provides information about the status of a Cypher query or command execution in compliance with the GQL standard. +From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API (deprecated since 5.26). +The GqlStatusObject API provides information about the status of a Cypher query or command execution in compliance with the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard]. -This page describes both the Neo4j Notification and the GQL-status object frameworks, how they are structured, the objects they provide for notifications, and how to interpret them. +This page describes the GQL-status object and the Neo4j notification frameworks, their structure, the objects they provide for notification, and how to interpret them. It also explains the server notification grouping and filtering, the notification internals, and the server-driver compatibility for both the Notification and GqlStatusObject APIs. -[[neo4j-notification-object]] -== Neo4j notification object - -The Neo4j notification object contains diagnostic information representing the successful outcome of a Cypher query or command execution, including severity, the `ClientNotification` code, category, title, description, and position in the query text where the notification is relevant. -Depending on the application, some of the fields from the notification object might not be visible. - -The notification object consists of the following fields: - -.Neo4j notification object -[cols="<1s,<4"] -|=== -|Neo4j code -a|The Neo4j status code in the form of `Neo.ClientNotification.[SubType].[Name]`. -|Title -a|The title of the Neo4j status code. -|Description -a|The description of the specific notification. -|Severity level -a|The severity can be one of the following: - -- `WARNING`: There might be a problem with your query. Please, take a look. -- `INFORMATION`: The query is correct, but this information can still be useful. -|Category -a|The category of the notification. -|Position -a|The position, given by row and column, where the notification is relevant in the query text. -|=== - - [role=label--version-5.23] [[gqlstatus-notification-object]] == GQL-status notification object -In the GQL-status object framework, notifications are an implementation-defined subset of the GQL-status objects that cover informational notes and warnings, but not errors, `SUCCESS`, `NO DATA`, or `OMITTED RESULT`. -For the latter, see <>. + - -In GQL, the execution of a query from user to server always has an outcome, called the _execution outcome_. -The execution outcome is a list of GQL-status objects, ordered by the following precedence, where the first object in the list is the primary GQL-status object: +In the GQL-status object framework, when a user executes a query to the server, it always produces a result known as the _execution outcome_. +If no error occurs during execution, the outcome is recorded as a completion condition, indicating a successful result with a regular non-empty result, an omitted result, or no data. +It is represented as a list of GQL-status objects, which are organized according to the following precedence rules, where the first object in the list is the primary GQL-status object: . `NO DATA` has precedence over `WARNING`. . `WARNING` has precedence over the `SUCCESSFUL COMPLETION` subclass. . `SUCCESSFUL COMPLETION` subclass has precedence over `INFORMATIONAL`. . `INFORMATIONAL` is the condition with the least precedence. +For more information about `SUCCESSFUL COMPLETION`, `NO DATA`, or `OMITTED RESULT`, see <>. + +The GQL-status object can contain multiple GQL-status objects, where each object represents a different condition of the query execution. The primary GQL-status object describes the condition with the greatest precedence and is always present. All other GQL-status objects in the list are additional GQL-status objects. -The GQL-status object also includes the Neo4j-specific information, such as the severity level and the classification of the notification, which can be used for filtering. +The GQL-status object also includes Neo4j-specific information, such as severity level and notification classification, which can be used for filtering. For more information about notification grouping and filtering, see <>. Each GQL-status object consists of the following fields: @@ -68,13 +39,13 @@ Each GQL-status object consists of the following fields: [cols="<1s,<4"] |=== |GQLSTATUS code -a| A 5-character string that is the concatenation of a 2-character class code followed by a 3-character subclass code. +a| A 5-character string that is the concatenation of a 2-character class code followed by a 3-character subclass code, which identifies the condition of the notification. |StatusDescription -a| A human-readable description of the GQLSTATUS, which consists of a condition, a subcondition, and a description. +a| A human-readable description of the GQLSTATUS, which consists of a condition, a subcondition, and an optional additional text about the condition. The condition and subcondition are textual representations of the class and subclass codes, respectively. | DiagnosticRecord a| Extra information about the status, given as key-value pairs, both on the server and driver side. -To retrieve the full diagnostic record, you can use the `diagnosticRecord()` method on both the server and driver sides. +To retrieve the full diagnostic record, you can use the `diagnosticRecord()` on the server side or the corresponding method on the driver sides. Additional helper methods are exposed for some useful fields. [cols="<1s,<4"] !=== @@ -93,7 +64,6 @@ Additional helper methods are exposed for some useful fields. !=== |=== - [[general-codes-for-success]] === General codes for success @@ -178,6 +148,35 @@ The following table lists the Neo4j-defined groups of GQLSTATUS codes and their |=== +[role=label--deprecated-5.26] +[[neo4j-notification-object]] +== Neo4j-status notification object + +The Neo4j-status object for notifications contains diagnostic information representing the successful outcome of a Cypher query or command execution, including severity, the `ClientNotification` code, category, title, description, and position in the query text where the notification is relevant. +Depending on the application, some of the fields from the notification object might not be visible. + +The notification object consists of the following fields: + +.Neo4j notification object +[cols="<1s,<4"] +|=== +|Neo4j code +a|The Neo4j code in the form of `Neo.ClientNotification.[SubType].[Name]`. +|Title +a|The title of the Neo4j code. +|Description +a|The description of the specific notification. +|Severity level +a|The severity can be one of the following: + +- `WARNING`: There might be a problem with your query. Please, take a look. +- `INFORMATION`: The query is correct, but this information can still be useful. +|Category +a|The category of the notification. +|Position +a|The position, given by row and column, where the notification is relevant in the query text. +|=== + [[notification-grouping-and-filtering]] == Server notification grouping and filtering @@ -246,6 +245,7 @@ The following notification groups exist in Neo4j, ordered by severity: | |=== +[role=label--deprecated-5.26] [[notification-internals]] == Notification internals @@ -254,7 +254,7 @@ During the handshake process, they agree on using the newest possible Bolt proto For more information on the Bolt versions supported by different server versions, see the link:https://neo4j.com/docs/bolt/current/bolt-compatibility[Bolt Protocol documentation]. On the server side, notifications are part of the Result Core API. -A method called `getNotifications()` returns a list of server-side notification objects. +A method called `getNotifications()`, which is deprecated since 5.26, returns a list of server-side notification objects. These notifications are then sent to the driver as success Bolt message metadata. On the driver side, notifications are part of the ResultSummary API, which has a method called `notifications()` that returns a list of driver-side Notification objects. The result of the `getCode()` or `code()` methods is known as the Neo4j status code. @@ -263,6 +263,7 @@ For more information, see <