Table of Contents

Interface IDriver

Namespace
Neo4j.Driver
Assembly
Neo4j.Driver.dll

The IDriver instance maintains the connections with a Neo4j database, providing an access point via the IAsyncSession interface and the ExecutableQuery method.

public interface IDriver : IDisposable, IAsyncDisposable
Inherited Members
Extension Methods

Remarks

While the driver object is thread-safe, disposing is not. Make sure you are not using the driver object or any resources spawned from it(such as sessions or transactions) when it is disposed.

Properties

Config

Gets the driver configurations.

Encrypted

Gets Encrypted status

Methods

AsyncSession()

Obtain a session with the default SessionConfig.

AsyncSession(Action<SessionConfigBuilder>)

Obtain a session with the customized SessionConfig.

ExecutableQuery(string)

Gets an IExecutableQuery<TIn, TOut> that can be used to configure and execute a query using fluent method chaining.

GetExecutableQueryBookmarkManager()

Returns an IBookmarkManager interface to the bookmark manager that the driver is using to ensure causal consistency between calls to the ExecutableQuery interface. This can be used to have causal consistency when using the API interfaces supplied by Session objects alongside calls to ExecutableQuery.

GetServerInfoAsync()

Asynchronously verify if the driver can connect to the remote server returning server info. If the driver fails to connect to the remote server, an error will be thrown, which can be used to further understand the cause of the connectivity issue. Note: Even if this method failed with an error, the driver still needs to be disposed to free up all resources.

SupportsMultiDbAsync()

Asynchronously verify if the driver connects to a server and/or cluster that can support multi-database feature.

SupportsSessionAuthAsync()

Asynchronously verify if the driver supports re-auth.

TryVerifyConnectivityAsync()

Asynchronously verify if the driver can connect to the remote server.

VerifyAuthenticationAsync(IAuthToken)

Asynchronously verify if the driver can connect using the authToken.
Try to establish a working read connection to the remote server or a member of a cluster and exchange some data.In a cluster, there is no guarantee about which server will be contacted. If the data exchange is successful and the authentication information is valid, true is returned. Otherwise, the error will be matched against a list of known authentication errors.If the error is on that list, false is returned indicating that the authentication information is invalid. If the not on the list, the error is thrown.

VerifyConnectivityAsync()

Asynchronously verify if the driver can connect to the remote server by establishing a network connection with the remote. If the driver fails to connect to the remote server, an error will be thrown, which can be used to further understand the cause of the connectivity issue. Note: Even if this method failed with an error, the driver still need to be disposed to free up all resources.