Skip to main content

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

Declaration
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.

Declaration
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.

Declaration
public override int CommandTimeout { get; set; }

CommandType

Gets or sets how the System.Data.Common.DbCommand.CommandText property is interpreted.

Declaration
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.

Declaration
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.

Declaration
public override UpdateRowSource UpdatedRowSource { get; set; }

DbConnection

Gets or sets the System.Data.Common.DbConnection used by this System.Data.Common.DbCommand.

Declaration
protected override DbConnection DbConnection { get; set; }

DbParameterCollection

Gets the collection of System.Data.Common.DbParameter objects.

Declaration
protected override DbParameterCollection DbParameterCollection { get; }

DbTransaction

Gets or sets the System.Data.Common.DbTransaction within which this System.Data.Common.DbCommand object executes.

Declaration
protected override DbTransaction DbTransaction { get; set; }

Methods

Cancel()

Attempts to cancel the execution of a System.Data.Common.DbCommand.

Declaration
public override void Cancel()

ExecuteNonQuery()

Executes the command against its connection object, returning the number of rows affected.

Declaration
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.

Declaration
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.

Declaration
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
Returns

System.Data.Common.DbDataReader

A System.Data.Common.DbDataReader object.

Parameters
TypeNameDescription
System.Data.CommandBehaviorbehaviorAn 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.

Declaration
public override void Prepare()

CreateDbParameter()

Creates a new instance of a System.Data.Common.DbParameter object.

Declaration
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.

Declaration
protected override void Dispose(bool disposing)
Parameters
TypeNameDescription
System.Booleandisposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

Implements

  • System.ComponentModel.IComponent
  • System.Data.IDbCommand
  • System.IDisposable
  • System.IAsyncDisposable

Inherited Members

  • System.Data.Common.DbCommand.CreateParameter
  • System.Data.Common.DbCommand.DisposeAsync
  • System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(System.Data.CommandBehavior,System.Threading.CancellationToken)
  • System.Data.Common.DbCommand.ExecuteNonQueryAsync
  • System.Data.Common.DbCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)
  • System.Data.Common.DbCommand.ExecuteReader
  • System.Data.Common.DbCommand.ExecuteReader(System.Data.CommandBehavior)
  • System.Data.Common.DbCommand.ExecuteReaderAsync
  • System.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.ExecuteScalarAsync
  • System.Data.Common.DbCommand.ExecuteScalarAsync(System.Threading.CancellationToken)
  • System.Data.Common.DbCommand.PrepareAsync(System.Threading.CancellationToken)
  • System.Data.Common.DbCommand.Connection
  • System.Data.Common.DbCommand.Parameters
  • System.Data.Common.DbCommand.Transaction
  • System.ComponentModel.Component.Dispose
  • System.ComponentModel.Component.GetService(System.Type)
  • System.ComponentModel.Component.ToString
  • System.ComponentModel.Component.CanRaiseEvents
  • System.ComponentModel.Component.Container
  • System.ComponentModel.Component.DesignMode
  • System.ComponentModel.Component.Events
  • System.ComponentModel.Component.Site
  • System.ComponentModel.Component.Disposed
  • System.MarshalByRefObject.GetLifetimeService
  • System.MarshalByRefObject.InitializeLifetimeService
  • System.MarshalByRefObject.MemberwiseClone(System.Boolean)
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone
  • System.Object.ReferenceEquals(System.Object,System.Object)

Was this page helpful?