Skip to content

Commit 1751c65

Browse files
Improve docs about compatibility codes (#172) (#174)
Documentation about 01N42, 02N42, 03N42. Also tried to remove some duplication by only referring to one single place so the content does not diverge. --------- Co-authored-by: Louise Berglund <[email protected]>
1 parent 42c989b commit 1751c65

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

modules/ROOT/pages/notifications/index.adoc

+29-6
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ The Neo4j classification, severity, position, and status parameters are not mean
125125
|===
126126

127127
GQLSTATUS general codes are filled in by the server unless the server is too old to be aware of GQL-status objects, in which case, it is polyfilled by the driver (see <<server-driver-compatibility, Server - driver compatibility>>).
128-
The driver tries to deduce `SUCCESS`, `OMITTED RESULT`, or `NO DATA` from the returned number of records and columns.
129-
If that fails, it uses the GQLSTATUS 02N42 (`no data: unknown subcondition. Unknown GQLSTATUS from old server.`) to indicate that the server did not provide a GQL-status object.
130-
Then, it poly-fills statuses from the notifications and merges the two lists according to the GQL precedence rules described in <<gqlstatus-notification-object, GQL-status notification object>>.
131128

132129
[[gqlstatus-codes]]
133130
=== Neo4j-defined GQLSTATUS codes
@@ -276,10 +273,36 @@ The current Notification API is still present, and the GqlStatusObject API can b
276273
To fully utilize the GqlStatusObject API, both your server and the driver must support it.
277274
Drivers that are older than 5.23 send only notifications from the Notification API, even if the server is 5.22 or later.
278275

279-
If the 5.23 driver talks to a server that is too old to be aware of GQL-status objects, the driver tries to deduce `SUCCESS`, `OMITTED RESULT`, or `NO DATA` from the returned number of records and columns.
280-
If that fails, it uses the GQLSTATUS 02N42 (`no data: unknown subcondition. Unknown GQLSTATUS from old server.`) to indicate that the server did not provide a GQL-status object.
281-
Then, it poly-fills statuses from the notifications and merges the two lists according to the GQL precedence rules described in <<gqlstatus-notification-object, GQL-status notification object>>.
276+
If a driver of version 5.23 or later talks to a server that is too old to be aware of GQL-status objects, the driver needs to poly-fill the GqlStatusObject API with information.
277+
The driver tries to deduce `SUCCESS`, `OMITTED RESULT`, or `NO DATA` from the returned number of records and columns.
278+
If that fails, the general GQLSTATUS code will be set to `02N42`.
279+
Then, the driver poly-fills the rest of the GQL-status object list with the notifications from the old notification API.
280+
These will get GQLSTATUS `01N42` for notifications with severity `WARNING` and `03N42` for notifications with severity `INFORMATION`.
281+
Finally, the list of poly-filled GQL-status objects is sorted according to the GQL precedence rules described in <<gqlstatus-notification-object, GQL-status notification object>>.
282282

283+
.GQLSTATUS compatibility codes
284+
[cols="1,2,1,4", options="header"]
285+
|===
286+
|GQLSTATUS
287+
|Condition
288+
|Subcondition
289+
|Description
290+
291+
| 01N42
292+
| Warning
293+
| Unknown warning
294+
| Poly-filled notification with severity `WARNING`.
295+
296+
| 02N42
297+
| No data
298+
| Unknown subcondition
299+
| Poly-filled general status when `SUCCESS`, `OMITTED RESULT`, or `NO DATA` cannot be deduced.
300+
301+
| 03N42
302+
| Informational
303+
| Unknown notification
304+
| Poly-filled notification with severity `INFORMATION`.
305+
|===
283306
// The following table illustrates the compatibility between the different server and driver versions for both the current Notification API and the GqlStatusObject API:
284307

285308
// TODO

0 commit comments

Comments
 (0)