Home Reference Source
import {GqlStatusObject} from 'neo4j-driver-core/lib/notification.js'
public class | source

GqlStatusObject

this class is experimental.

Representation for GqlStatusObject found when executing a query.

This object represents a status of query execution. This status is a superset of Notification.

Member Summary

Public Members
public

The classification

public

The diagnostic record as it is.

public get

The json string representation of the diagnostic record.

public

gqlStatus: string

The GQLSTATUS

public

isNotification: boolean

Indicates if this object represents a notification and it can be filtered using NotificationFilter.

public

position: NotificationPosition | undefined

The position at which the notification had occurred.

public

rawClassification: string | undefined

The category returned by the server without any validation.

public

rawSeverity: string | undefined

The severity returned in the diagnostic record from the server without any validation.

public

The severity

public

The GQLSTATUS description

Public Members

public classification: NotificationClassification source

The classification

Example:

const { summary } = await session.run("RETURN 1")

for (const gqlStatusObject of summary.gqlStatusObjects) {
    switch(gqlStatusObject.classification) {
        case neo4j.notificationClassification.QUERY: // or simply 'QUERY'
            console.info(gqlStatusObject.statusDescription)
            break
        case neo4j.notificationClassification.PERFORMANCE: // or simply 'PERFORMANCE'
            console.warn(gqlStatusObject.statusDescription)
            break
        case neo4j.notificationClassification.UNKNOWN: // or simply 'UNKNOWN'
        default:
            // the raw info came from the server can be found at notification.rawCategory
            console.log(gqlStatusObject.statusDescription)
            break
    }
}

public diagnosticRecord: object source

The diagnostic record as it is.

public get diagnosticRecordAsJsonString: string source

The json string representation of the diagnostic record. The goal of this method is provide a serialized object for human inspection.

public gqlStatus: string source

The GQLSTATUS

public isNotification: boolean source

Indicates if this object represents a notification and it can be filtered using NotificationFilter.

Only GqlStatusObject which is Notification has meaningful position, severity and classification.

public position: NotificationPosition | undefined source

The position at which the notification had occurred.

public rawClassification: string | undefined source

The category returned by the server without any validation.

public rawSeverity: string | undefined source

The severity returned in the diagnostic record from the server without any validation.

public severity: NotificationSeverityLevel source

The severity

Example:

const { summary } = await session.run("RETURN 1")

for (const gqlStatusObject of summary.gqlStatusObjects) {
    switch(gqlStatusObject.severity) {
        case neo4j.notificationSeverityLevel.INFORMATION: // or simply 'INFORMATION'
            console.info(gqlStatusObject.statusDescription)
            break
        case neo4j.notificationSeverityLevel.WARNING: // or simply 'WARNING'
            console.warn(gqlStatusObject.statusDescription)
            break
        case neo4j.notificationSeverityLevel.UNKNOWN: // or simply 'UNKNOWN'
        default:
            // the raw info came from the server could be found at gqlStatusObject.rawSeverity
            console.log(gqlStatusObject.statusDescription)
            break
    }
}

public statusDescription: string source

The GQLSTATUS description