Class MetaDBCommand
Represents a database command that enables querying MetaFileSystem tabular data using
DuckDB SQL syntax. This command wraps an underlying System.Data.Common.DbCommand and
applies additional query parsing and backend storage setup if necessary.
Namespace: Workspace.XBR.Xperiflow.MetaDB
Assembly: Xperiflow.dll
public class MetaDBCommand : DbCommand, IComponent, IDbCommand, IDisposable, IAsyncDisposable
Inheritance: System.Object -> System.MarshalByRefObject -> System.ComponentModel.Component -> System.Data.Common.DbCommand
Remarks
Note that this class is not thread-safe due to the short-lived connection string that is set at query time.
Implements:
System.ComponentModel.IComponent, System.Data.IDbCommand, System.IDisposable, System.IAsyncDisposable
Properties
CommandText
Gets or sets the text command to run against the data source.
public override string CommandText { get; set; }
CommandTimeout
Gets or sets the wait time (in seconds) before terminating the attempt to execute the command and generating an error.
public override int CommandTimeout { get; set; }
CommandType
Gets or sets how the System.Data.Common.DbCommand.CommandText property is interpreted.
public override CommandType CommandType { get; set; }
DesignTimeVisible
Gets or sets a value indicating whether the command object should be visible in a customized interface control.
public override bool DesignTimeVisible { get; set; }
UpdatedRowSource
Gets or sets how command results are applied to the System.Data.DataRow when used by the Update method of a System.Data.Common.DbDataAdapter.
public override UpdateRowSource UpdatedRowSource { get; set; }
DbConnection
Gets or sets the System.Data.Common.DbConnection used by this System.Data.Common.DbCommand.
protected override DbConnection DbConnection { get; set; }
DbParameterCollection
Gets the collection of System.Data.Common.DbParameter objects.
protected override DbParameterCollection DbParameterCollection { get; }
DbTransaction
Gets or sets the System.Data.Common.DbTransaction within which this System.Data.Common.DbCommand object executes.
protected override DbTransaction DbTransaction { get; set; }
Methods
Cancel()
Attempts to cancel the execution of a System.Data.Common.DbCommand.
public override void Cancel()
ExecuteNonQuery()
Executes the command against its connection object, returning the number of rows affected.
public override int ExecuteNonQuery()
Returns
System.Int32
The number of rows affected.
ExecuteScalar()
Executes the command and returns the first column of the first row in the first returned result set. All other columns, rows and result sets are ignored.
public override object ExecuteScalar()
Returns
System.Object
The first column of the first row in the first result set.
ExecuteDbDataReader(CommandBehavior)
Executes the command against its connection, returning a System.Data.Common.DbDataReader which can be used to access the results.
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
Returns
System.Data.Common.DbDataReader
A System.Data.Common.DbDataReader object.
Parameters
| Type | Name | Description |
|---|---|---|
System.Data.CommandBehavior | behavior | An instance of System.Data.CommandBehavior, specifying options for command execution and data retrieval. |
Exceptions
System.Data.Common.DbException
An error occurred while executing the command.
System.ArgumentException
An invalid System.Data.CommandBehavior value.
Prepare()
Creates a prepared (or compiled) version of the command on the data source.
public override void Prepare()
CreateDbParameter()
Creates a new instance of a System.Data.Common.DbParameter object.
protected override DbParameter CreateDbParameter()
Returns
System.Data.Common.DbParameter
A System.Data.Common.DbParameter object.
Dispose(bool)
Releases the unmanaged resources used by the System.ComponentModel.Component and optionally releases the managed resources.
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Implements
System.ComponentModel.IComponentSystem.Data.IDbCommandSystem.IDisposableSystem.IAsyncDisposable
Inherited Members
System.Data.Common.DbCommand.CreateParameterSystem.Data.Common.DbCommand.DisposeAsyncSystem.Data.Common.DbCommand.ExecuteDbDataReaderAsync(System.Data.CommandBehavior,System.Threading.CancellationToken)System.Data.Common.DbCommand.ExecuteNonQueryAsyncSystem.Data.Common.DbCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)System.Data.Common.DbCommand.ExecuteReaderSystem.Data.Common.DbCommand.ExecuteReader(System.Data.CommandBehavior)System.Data.Common.DbCommand.ExecuteReaderAsyncSystem.Data.Common.DbCommand.ExecuteReaderAsync(System.Data.CommandBehavior)System.Data.Common.DbCommand.ExecuteReaderAsync(System.Data.CommandBehavior,System.Threading.CancellationToken)System.Data.Common.DbCommand.ExecuteReaderAsync(System.Threading.CancellationToken)System.Data.Common.DbCommand.ExecuteScalarAsyncSystem.Data.Common.DbCommand.ExecuteScalarAsync(System.Threading.CancellationToken)System.Data.Common.DbCommand.PrepareAsync(System.Threading.CancellationToken)System.Data.Common.DbCommand.ConnectionSystem.Data.Common.DbCommand.ParametersSystem.Data.Common.DbCommand.TransactionSystem.ComponentModel.Component.DisposeSystem.ComponentModel.Component.GetService(System.Type)System.ComponentModel.Component.ToStringSystem.ComponentModel.Component.CanRaiseEventsSystem.ComponentModel.Component.ContainerSystem.ComponentModel.Component.DesignModeSystem.ComponentModel.Component.EventsSystem.ComponentModel.Component.SiteSystem.ComponentModel.Component.DisposedSystem.MarshalByRefObject.GetLifetimeServiceSystem.MarshalByRefObject.InitializeLifetimeServiceSystem.MarshalByRefObject.MemberwiseClone(System.Boolean)System.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)