Home Reference Source

Variable

Static Public Summary
public

PROTOCOL_ERROR: string

Error code representing serialization/deserialization issue in the Bolt protocol.

public

READ: string

Constant that represents read session access mode.

public

An object containing functions to use the Object Mapping feature

public

Error code representing complete loss of service.

public

SESSION_EXPIRED: string

Error code representing transient loss of service.

public

WRITE: string

Constant that represents write session access mode.

public
public

Holds the common AuthTokenManagers used in the Driver.

public

Holds the common ClientCertificateProviders used in the Driver.

since 5.27
public

Object containing string constants representing predefined Neo4jError codes.

public
public
public

inSafeRange(value: Mixed): Boolean

Check if a variable can be safely converted to a number

public

int(value: Mixed, opts: Object): Integer

Cast value to Integer type.

public
public

isInt(value: Mixed): Boolean

Check if a variable is of Integer type.

public

isRetriableError(error: object | undefined | null): boolean

this variable was deprecated. members using the spelling 'retriable' will be removed in 7.0. Use {@link isRetryableError} instead.

Verifies if the given error is retriable.

public

isRetryableError(error: object | undefined | null): boolean

Verifies if the given error is retryable.

public

Object containing predefined logging configurations.

public
this variable was deprecated. use {@link notificationClassification} instead.

Constants that represents the Category in the Notification

public

Constants that represents the Classification in the GqlStatusObject

public
this variable was deprecated. use {@link notificationFilterDisabledClassification} instead.

Constants that represents the disabled categories in the NotificationFilter

public

Constants that represents the disabled classifications in the NotificationFilter

public

Constants that represents the minimum Severity level in the NotificationFilter

public

Constants that represents the Severity level in the GqlStatusObject

public

queryType: {SCHEMA_WRITE: string, WRITE_ONLY: string, READ_ONLY: string, READ_WRITE: string}

The constants for query types

public
public
public

Constants that represents routing modes.

public

An object containing rule factories for use with the Object Mapping feature.

public
public
public
public

toNumber(value: Mixed): number

Converts a variable to a number

public

toString(value: Mixed, radix: number): string

Converts the integer to a string representation

public

Static Public

public PROTOCOL_ERROR: string source

import {PROTOCOL_ERROR} from 'neo4j-driver-core/lib/error.js'

Error code representing serialization/deserialization issue in the Bolt protocol. Used by Neo4jError#code.

public READ: string source

import {READ} from 'neo4j-driver-core/lib/driver.js'

Constant that represents read session access mode. Should be used like this: driver.session({ defaultAccessMode: neo4j.session.READ }).

public RecordObjectMapping source

import {RecordObjectMapping} from 'neo4j-driver-core/lib/mapping.highlevel.js'

An object containing functions to use the Object Mapping feature

Properties:

NameTypeAttributeDescription
clearMappingRegistry function()

Clears the mapping registry from Rule/Class pairs set with RecordObjectMapping.register

getCaseTranslator function(databaseConvention: string, codeConvention: string)

Creates a translation function from record key names to object property names, for use with the RecordObjectMapping.translateIdentifiers function

register function(constructor: GenericConstructor, rules: Rules)

Registers a set of Rules to be used by hydrated for the provided class when no other rules are specified. This registry exists in global memory, not the driver instance.

translateIdentifiers function(translationFunction: any)

Sets a default name translation from record keys to object properties. Provide a function that maps FROM your object properties names TO record key names.

public SERVICE_UNAVAILABLE: string source

import {SERVICE_UNAVAILABLE} from 'neo4j-driver-core/lib/error.js'

Error code representing complete loss of service. Used by Neo4jError#code.

public SESSION_EXPIRED: string source

import {SESSION_EXPIRED} from 'neo4j-driver-core/lib/error.js'

Error code representing transient loss of service. Used by Neo4jError#code.

public WRITE: string source

import {WRITE} from 'neo4j-driver-core/lib/driver.js'

Constant that represents write session access mode. Should be used like this: driver.session({ defaultAccessMode: neo4j.session.WRITE }).

public auth source

Properties:

NameTypeAttributeDescription
basic function(username: string, password: string, realm: ?string)

the function to create a basic authentication token.

kerberos function(base64EncodedTicket: string)

the function to create a Kerberos authentication token. Accepts a single string argument - base64 encoded Kerberos ticket.

bearer function(base64EncodedTicket: string)

the function to create a Bearer authentication token. Accepts a single string argument - base64 encoded Bearer ticket.

custom function(principal: string, credentials: string, realm: string, scheme: string, parameters: ?object)

the function to create a custom authentication token.

public authTokenManagers source

import {authTokenManagers} from 'neo4j-driver-core/lib/auth-token-manager.js'

Holds the common AuthTokenManagers used in the Driver.

public clientCertificateProviders since 5.27 source

import {clientCertificateProviders} from 'neo4j-driver-core/lib/client-certificate.js'

Holds the common ClientCertificateProviders used in the Driver.

public error source

import {error} from 'neo4j-driver-core'

Object containing string constants representing predefined Neo4jError codes.

public forExport source

import forExport from 'neo4j-driver'

public graph source

import {graph} from 'neo4j-driver'

public inSafeRange(value: Mixed): Boolean source

import {inSafeRange} from 'neo4j-driver-core/lib/integer.js'

Check if a variable can be safely converted to a number

Return:

Boolean

true if it is safe to call toNumber on variable otherwise false

public int(value: Mixed, opts: Object): Integer source

Cast value to Integer type.

Return:

Integer

An object of type Integer.

public integer source

import {integer} from 'neo4j-driver'

public isInt(value: Mixed): Boolean source

import {isInt} from 'neo4j-driver-core/lib/integer.js'

Check if a variable is of Integer type.

Return:

Boolean

Is it of the Integer type?

public isRetriableError(error: object | undefined | null): boolean source

import {isRetriableError} from 'neo4j-driver-core/lib/error.js'
this variable was deprecated. members using the spelling 'retriable' will be removed in 7.0. Use {@link isRetryableError} instead.

Verifies if the given error is retriable.

Return:

boolean

true if the error is retriable

public isRetryableError(error: object | undefined | null): boolean source

import {isRetryableError} from 'neo4j-driver-core/lib/error.js'

Verifies if the given error is retryable.

Return:

boolean

true if the error is retryable

public logging source

import {logging} from 'neo4j-driver'

Object containing predefined logging configurations. These are expected to be used as values of the driver config's logging property.

Properties:

NameTypeAttributeDescription
console function(level: ?string): object

the function to create a logging config that prints all messages to console.log with timestamp, level and message. It takes optional level parameter which represents the maximum log level to be logged with default value is 'info' and another unredactDebugLogs which changes the output to debug logs to unredact query parameters and record fields.

public notificationCategory source

import {notificationCategory} from 'neo4j-driver-core/lib/notification.js'
this variable was deprecated. use {@link notificationClassification} instead.

Constants that represents the Category in the Notification

public notificationClassification: notificationCategory source

import {notificationClassification} from 'neo4j-driver-core/lib/notification.js'

Constants that represents the Classification in the GqlStatusObject

public notificationFilterDisabledCategory source

import {notificationFilterDisabledCategory} from 'neo4j-driver-core/lib/notification-filter.js'
this variable was deprecated. use {@link notificationFilterDisabledClassification} instead.

Constants that represents the disabled categories in the NotificationFilter

public notificationFilterDisabledClassification: NotificationFilterDisabledClassification source

import {notificationFilterDisabledClassification} from 'neo4j-driver-core/lib/notification-filter.js'

Constants that represents the disabled classifications in the NotificationFilter

public notificationFilterMinimumSeverityLevel source

import {notificationFilterMinimumSeverityLevel} from 'neo4j-driver-core/lib/notification-filter.js'

Constants that represents the minimum Severity level in the NotificationFilter

public notificationSeverityLevel source

import {notificationSeverityLevel} from 'neo4j-driver-core/lib/notification.js'

Constants that represents the Severity level in the GqlStatusObject

public queryType: {SCHEMA_WRITE: string, WRITE_ONLY: string, READ_ONLY: string, READ_WRITE: string} source

import {queryType} from 'neo4j-driver-core/lib/result-summary.js'

The constants for query types

public rawPolyfilledDiagnosticRecord source

import {rawPolyfilledDiagnosticRecord} from 'neo4j-driver-core/lib/gql-constants.js'

public resultTransformers source

import resultTransformers from 'neo4j-driver-core/lib/result-transformers.js'

public routing source

import {routing} from 'neo4j-driver-core/lib/driver.js'

Constants that represents routing modes.

Example:

driver.executeQuery("<QUERY>", <PARAMETERS>, { routing: neo4j.routing.WRITE })

public rule source

An object containing rule factories for use with the Object Mapping feature. Each factory produces an instance of the Rule type that validates and handles the type All factories except rule.asObject can take an optional instance of a Rule to override those fields of the produced rule. The fields of Rule are:

  • optional: marks a field as optional, and the driver will not throw if it is missing during mapping
  • from: The string used to identify this value in the database. For when parameters or returned fields do not match the name of your domain objects fields.
  • convert: A function to convert the value from a result after it has been validated.
  • parameterConversion: A function to convert a parameter before validation and transmission to the database.
  • validate: A function to validate the value, should throw an error if it is invalid.

Properties:

NameTypeAttributeDescription
asBoolean function(rule: ?Rule)

Create a Rule that validates the value is a Boolean.

asString function(rule: ?Rule)

Create a Rule that validates the value is a String.

asNumber function(rule: ?Rule & { isInteger?: boolean })

Create a Rule that validates the value is a Number.

asBigInt function(rule: ?Rule & { acceptNumber?: boolean })

Create a Rule that validates the value is a BigInt.

asInteger function(rule: ?Rule & { acceptNumber?: boolean })

Create a Rule that validates the value is an Integer.

asNode function(rule: ?Rule)

Create a Rule that validates the value is a Node.

asRelationship function(rule: ?Rule)

Create a Rule that validates the value is a Relationship.

asPath function(rule: ?Rule)

Create a Rule that validates the value is a Path.

asPoint function(rule: ?Rule)

Create a Rule that validates the value is a Point.

asDuration function(rule: ?Rule & { stringify?: boolean })

Create a Rule that validates the value is a Duration.

asLocalTime function(rule: ?Rule & { stringify?: boolean })

Create a Rule that validates the value is a LocalTime.

asTime function(rule: ?Rule & { stringify?: boolean })

Create a Rule that validates the value is a Time.

asDate function(rule: ?Rule & { stringify?: boolean, jsNativeDate?: boolean })

Create a Rule that validates the value is a Date.

asLocalDateTime function(rule: ?Rule & { stringify?: boolean, jsNativeDate?: boolean })

Create a Rule that validates the value is a LocalDateTime.

asDateTime function(rule: ?Rule & { stringify?: boolean, jsNativeDate?: boolean })

Create a Rule that validates the value is a DateTime.

asList function(rule: ?Rule & { apply?: Rule })

Create a Rule that validates the value is a List.

asVector function(rule: ?Rule & { asTypedList?: boolean, dimension?: number, type?: VectorType })

Create a Rule that validates the value is a Vector.

asUUID function(rule: ?Rule & { stringify?: boolean })

Create a Rule that validates the value is a UUID.

asObject function(rules: Rules)

Create a Rule for an object, allowing complex mapping of even nested results.

public session source

import {session} from 'neo4j-driver'

public spatial source

import {spatial} from 'neo4j-driver'

public temporal source

import {temporal} from 'neo4j-driver'

public toNumber(value: Mixed): number source

import {toNumber} from 'neo4j-driver-core/lib/integer.js'

Converts a variable to a number

Return:

number

the variable as a number

public toString(value: Mixed, radix: number): string source

import {toString} from 'neo4j-driver-core/lib/integer.js'

Converts the integer to a string representation

Return:

string

returns a string representation of the integer

public types source

import {types} from 'neo4j-driver'