Interface IDriver
The IDriver instance maintains the connections with a Neo4j database, providing an access point via the IAsyncSession method.
public interface IDriver : IDisposable, IAsyncDisposable
- Inherited Members
- Extension Methods
Remarks
The Driver maintains a connection pool buffering connections created by the user. The size of the buffer can be configured by the MaxConnectionPoolSize property on the Config when creating the Driver.
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.
- CloseAsync()
Asynchronously releases all resources (connection pools, connections, etc) associated with this IDriver instance.
- ExecutableQuery(string)
Gets an IExecutableQuery<TIn, TOut> that can be used to configure and execute a query using fluent method chaining.
- 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 need to be closed via CloseAsync() 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 closed via CloseAsync() to free up all resources.