Class DeephavenCommand
Executes ad-hoc Deephaven queries against a Deephaven Open API server.
Inheritance
Namespace: Deephaven.Connector
Assembly: Deephaven.Connector.dll
Syntax
public sealed class DeephavenCommand : DbCommand
Remarks
Unlike most ADO.NET implementations, this does not accept SQL queries/commands.
Groovy and Python query expressions are accepted, depending on the session
type specified when the DeephavenConnection is created.
When ExecuteDbDataReader(CommandBehavior) is called, the
query or queries specied in CommandText are sent to the
server for execution, and a snapshot of the result(s) produced.
The query results can be iterated using the standard
Constructors
DeephavenCommand()
Constructs an instance of the DeephavenCommand object.
Declaration
public DeephavenCommand()
DeephavenCommand(DbConnection)
Constructs an instance of the DeephavenCommand object with the given connection. The connection should be an instance of DeephavenConnection.
Declaration
public DeephavenCommand(DbConnection dbConnection)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | dbConnection | The DeephavenConnection to use. |
DeephavenCommand(String, DbConnection)
Constructs an instance of the DeephavenCommand object with the given command text and connection. The connection should be an instance of DeephavenConnection.
Declaration
public DeephavenCommand(string commandText, DbConnection dbConnection)
Parameters
Type | Name | Description |
---|---|---|
System.String | commandText | The command text in the appropriate language for the session type. |
DbConnection | dbConnection | The DeephavenConnection to use. |
Properties
CommandText
The command text in the appropriate language for the session type.
Declaration
public override string CommandText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CommandTimeout
The maximum time to wait when executing this query in seconds. Default is 600 (10 minutes). You may need to increase this parameter for complex or very large queries.
Declaration
public override int CommandTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
CommandType
The command type. Only text commands are supported at this time.
Declaration
public override CommandType CommandType { get; set; }
Property Value
Type | Description |
---|---|
CommandType |
DbConnection
Gets or sets the DbConnection used by this DbCommand. Must be a DeephavenConnection instance.
Declaration
protected override DbConnection DbConnection { get; set; }
Property Value
Type | Description |
---|---|
DbConnection |
DbParameterCollection
Gets the collection of DbParameter objects.
Declaration
protected override DbParameterCollection DbParameterCollection { get; }
Property Value
Type | Description |
---|---|
DbParameterCollection |
DbTransaction
Gets or sets the DbTransaction within which this
Declaration
protected override DbTransaction DbTransaction { get; set; }
Property Value
Type | Description |
---|---|
DbTransaction |
DesignTimeVisible
Gets or sets a value indicating whether the command object should be visible in a customized interface control.
Declaration
public override bool DesignTimeVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UpdatedRowSource
Gets or sets how command results are applied to the DataRow when used by the Update method of a DbDataAdapter.
Since updates are not presently supported, only
Declaration
public override UpdateRowSource UpdatedRowSource { get; set; }
Property Value
Type | Description |
---|---|
UpdateRowSource |
Methods
Cancel()
Attempts to cancel the execution of a
Declaration
public override void Cancel()
CreateDbParameter()
Creates a new instance of a DeephavenParameter object.
Declaration
protected override DbParameter CreateDbParameter()
Returns
Type | Description |
---|---|
DbParameter | A DeephavenParameter object. |
ExecuteDbDataReader(CommandBehavior)
Executes the command text against the connection.
Declaration
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
Parameters
Type | Name | Description |
---|---|---|
CommandBehavior | behavior | An instance of |
Returns
Type | Description |
---|---|
DbDataReader | A task representing the operation. |
ExecuteNonQuery()
Executes a statement against a connection object. Not presently supported.
Declaration
public override int ExecuteNonQuery()
Returns
Type | Description |
---|---|
System.Int32 |
ExecuteScalar()
Executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored. Not presently supported.
Declaration
public override object ExecuteScalar()
Returns
Type | Description |
---|---|
System.Object | The first column of the first row in the result set. |
Prepare()
Creates a prepared (or compiled) version of the command on the data source. Not presently supported.
Declaration
public override void Prepare()