v5.22.0 - Feedback wanted on GQL statuses in ResultSummary
#1067
robsdedude
announced in
Preview Features
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
GQL statuses in
ResultSummary
In version 5.22.0, we are introducing GQL compliant status objects for successful query through the
ResultSummary
.New GQL Status Objects
A new property
ResultSummary.gql_status_objects
has been introduced. It returns a sequence ofGqlStatusObject
s. These objects contain information about the execution of the query including notifications as they exist now (seeSummaryNotification
) but also an outcome status like00000
for "success",02000
for "no data", and00001
for "omitted result".Eventually, this API is planned to supersede the current notifications API.
The GqlStatusObjects will be presented in the following order:
02xxx
) has precedence over a warning;01xxx
) has precedence over a success.00xxx
) has precedence over anything informational (03xxx
).Notification Filtering
Some status objects are notifications (vendor-specific definition). Those notifications can be identified using
GqlStatusObject.is_notification
. They contain additional information like aclassification
,severity
, andposition
. Further, those notifications can be configured to be suppressed in the DBMS saving bandwidth not having to send them to the client as well as compute not having to check for those conditions.For this, the following driver config options can be used:
notifications_min_severity
(already existing)notifications_disabled_classifications
(new, same as the existingnotifications_disabled_categories
).If both options are provided, they are merged into a single list of disabled classifications/categories.
All filter config options will affect both the current notifications API as well as the notifications among the GQL status objects.
Polyfilling
There are now two APIs to access notifications: the old notifications API and the new GQL status API. To provide an easy migration path the driver will, depending on if the server is GQL aware or not (i.e., recent or old neo4j version), polyfill the API not supported by the server on a best-effort basis. In particular, GQL status objects have a GQLSTATUS code that has not counterpart in non-GQL-aware neo4j versions. Therefore, the driver will fill the GQLSTATUS with either
01N42
for warning notifications and03N42
for informational notifications. Further, such status codes might be used by the server in the transition phase towards full GQL compliance. They indicate a lack of a final status code and will likely change in the future.A list of all possible GQLSTATUS codes is not yet available as the server-side of this change is still very actively being worked on.
Example Usage
Which, when run against an empty 5.19 DBMS, gives the following output
Beta Was this translation helpful? Give feedback.
All reactions