Class DeephavenConnection
Manages a connection to a Deephaven Open API server.
Inheritance
System.Object
DeephavenConnection
Assembly: Deephaven.Connector.dll
Syntax
public sealed class DeephavenConnection : DbConnection
Constructors
DeephavenConnection()
Declaration
public DeephavenConnection()
DeephavenConnection(DeephavenConnectionStringBuilder)
Constructs an instance of the DeephavenConnection object using using options provided by the given connection string builder.
Declaration
public DeephavenConnection(DeephavenConnectionStringBuilder connectionStringBuilder)
Parameters
DeephavenConnection(String)
Constructs an instance of the DeephavenConnection object using options provided by the given connection string.
Declaration
public DeephavenConnection(string connectionString)
Parameters
Type |
Name |
Description |
System.String |
connectionString |
|
Fields
DefaultMaxHeapMb
Declaration
public const int DefaultMaxHeapMb = null
Field Value
Type |
Description |
System.Int32 |
|
DefaultPort
Declaration
public const int DefaultPort = null
Field Value
Type |
Description |
System.Int32 |
|
DefaultSessionType
Declaration
public const SessionType DefaultSessionType = SessionType.Groovy
Field Value
DefaultTimeoutMs
Declaration
public const int DefaultTimeoutMs = null
Field Value
Type |
Description |
System.Int32 |
|
OnError
Listener called when an error occurs on this connection.
Declaration
public Action<string> OnError
Field Value
Type |
Description |
Action<System.String> |
|
OnTokenRefresh
Listener for when auth token is refreshed for this connection.
Declaration
public Action<RefreshToken> OnTokenRefresh
Field Value
Type |
Description |
Action<Deephaven.OpenAPI.Shared.Data.RefreshToken> |
|
Properties
ConnectionString
Gets or sets the string used to open the connection. May be set only
when the connection is not open.
Declaration
public override string ConnectionString { get; set; }
Property Value
Type |
Description |
System.String |
|
Database
Gets the name of the current database after a connection is opened,
or the database name specified in the connection string before the
connection is opened.
Since Deephaven does not support more than one database instance
per connection, always returns an empty string.
Declaration
public override string Database { get; }
Property Value
Type |
Description |
System.String |
|
DataSource
Gets the name of the database server to which to connect.
Declaration
public override string DataSource { get; }
Property Value
Type |
Description |
System.String |
|
ServerVersion
Gets a string that represents the version of the server to which the object is connected.
Always returns an empty string.
Declaration
public override string ServerVersion { get; }
Property Value
Type |
Description |
System.String |
|
State
Gets a value that describes the state of the connection (open/closed).
Declaration
public override ConnectionState State { get; }
Property Value
Type |
Description |
ConnectionState |
|
Methods
BeginDbTransaction(IsolationLevel)
Declaration
protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
Parameters
Type |
Name |
Description |
IsolationLevel |
isolationLevel |
|
Returns
Type |
Description |
DbTransaction |
|
ChangeDatabase(String)
Changes the current database for an open connection.
Since Deephaven does not support multiple databases per connection,
throws a .
Declaration
public override void ChangeDatabase(string databaseName)
Parameters
Type |
Name |
Description |
System.String |
databaseName |
The name of the database for the connection to use.
|
Close()
Closes the connection to the database.
Declaration
public override void Close()
CreateDbCommand()
Declaration
protected override DbCommand CreateDbCommand()
Returns
Type |
Description |
DbCommand |
|
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Open()
Opens a database connection with the settings specified by the ConnectionString.
If the connection is already open, will throw a exception.
Declaration
public override void Open()