Skip to content

Commit b1ce2dd

Browse files
committed
add info about deprecated notification api and swap the code examples
1 parent 5f79778 commit b1ce2dd

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

modules/ROOT/pages/draft.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,13 @@ The ultimate goal is to have a 1-1 mapping between a GQLSTATUS code and a specif
2020

2121
If a Neo4j error matches a standard-defined condition and subcondition, then the standard-defined GQLSTATUS code should be used for that error. For instance, (Neo.ClientError.Statement.ArithmeticError, ArithmeticException, “/by zero”) matches the “data exception” condition and “division by zero” subcondition in GQL (i.e., 22012 GQLSTATUS code).
2222

23-
error: data exception - string data, right truncation
23+
error: data exception - string data, right truncation
24+
25+
26+
27+
Processing of GQL-requests can cause various conditions to be raised. Each such condition is identified by a unique code called GQLSTATUS, which is a character string that always includes a class code that specifies the principle category to which the condition belongs. It may also include a subclass code that specifies additional information about the reason for raising the condition. The exact format of GQLSTATUS codes is specified in Subclause 23.1, “GQLSTATUS”.
28+
For example, the GQLSTATUS '22003' identifies the exception condition “data exception — numeric value out of range”.
29+
The GQLSTATUS codes assigned by this document to conditions are stable and can be depended on to remain constant.
30+
There are two types of conditions:
31+
— completion conditions.
32+
— exception conditions.

modules/ROOT/pages/notifications/all-notifications.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[[listOfNnotifications]]
44
= List of all server notification codes
55

6-
The following page provides an overview of all notifications in Neo4j, including the GQLSTATUS codes and the legacy Neo4j codes, along with some scenarios and their possible solutions.
6+
The following page provides an overview of all notifications in Neo4j, including the GQLSTATUS codes and Neo4j legacy codes, along with some scenarios and their possible solutions.
77

88
* <<_performance_notifications, `PERFORMANCE` notifications>>
99
* <<_hint_notifications, `HINT` notifications>>
@@ -3369,7 +3369,7 @@ Use `DATABASE *` without the parameter to revoke the privilege on all databases.
33693369
.Notification details
33703370
[cols="<1s,<4"]
33713371
|===
3372-
|Neo4j code
3372+
|Neo4j legacy code
33733373
m|Neo.ClientNotification.Security.AuthProviderNotDefined
33743374
|Title
33753375
a|The auth provider is not defined.
@@ -3485,7 +3485,7 @@ If it is correct, make sure to add it as a known auth provider in one or both of
34853485
.Notification details
34863486
[cols="<1s,<4"]
34873487
|===
3488-
|Neo4j code
3488+
|Neo4j legacy code
34893489
m|Neo.ClientNotification.Security.ExternalAuthNotEnabled
34903490
|Title
34913491
a|External auth for user is not enabled.

modules/ROOT/pages/notifications/index.adoc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ After a successful query execution, the Neo4j server sends notifications to prov
77
The driver receives these notifications and sends them to the client, which displays them to the user.
88

99
From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API.
10+
The Notification API is deprecated since Neo4j 5.26.
1011
The GqlStatusObject API provides information about the status of a Cypher query or command execution in compliance with the GQL standard.
1112

1213
This page describes both the GQL-status object and the Neo4j Notification frameworks, how they are structured, the objects they provide for notifications, and how to interpret them.
@@ -148,18 +149,19 @@ The following table lists the Neo4j-defined groups of GQLSTATUS codes and their
148149

149150
|===
150151

151-
[[neo4j-notification-object]]
152-
== Neo4j notification object
152+
[role=label--deprecated-5.26]
153+
[[legacy-notification-object]]
154+
== Legacy notification object
153155

154-
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.
156+
The Neo4j legacy 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.
155157
Depending on the application, some of the fields from the notification object might not be visible.
156158

157-
The notification object consists of the following fields:
159+
The legacy notification object consists of the following fields:
158160

159-
.Neo4j notification object
161+
.Neo4j legacy notification object
160162
[cols="<1s,<4"]
161163
|===
162-
|Neo4j code
164+
|Neo4j legacy code
163165
a|The Neo4j status code in the form of `Neo.ClientNotification.[SubType].[Name]`.
164166
|Title
165167
a|The title of the Neo4j status code.
@@ -244,6 +246,7 @@ The following notification groups exist in Neo4j, ordered by severity:
244246
|
245247
|===
246248

249+
[role=label--deprecated-5.26]
247250
[[notification-internals]]
248251
== Notification internals
249252

@@ -252,7 +255,7 @@ During the handshake process, they agree on using the newest possible Bolt proto
252255
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].
253256

254257
On the server side, notifications are part of the Result Core API.
255-
A method called `getNotifications()` returns a list of server-side notification objects.
258+
A method called `getNotifications()`, which is deprecated since 5.26, returns a list of server-side notification objects.
256259
These notifications are then sent to the driver as success Bolt message metadata.
257260
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.
258261
The result of the `getCode()` or `code()` methods is known as the Neo4j status code.
@@ -261,6 +264,7 @@ For more information, see <<notification-grouping-and-filtering, Server notifica
261264

262265
From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API.
263266
This can be used using the `.getGqlStatusObjects()` method in the Result Core API or by using the latest Neo4j drivers.
267+
The Notification API is deprecated since Neo4j 5.26.
264268

265269
[[server-driver-compatibility]]
266270
== Server-driver version compatibility

0 commit comments

Comments
 (0)