Skip to main content

Class MetaDBConnection

Represents a decorator for System.Data.Common.DbConnection that wraps an underlying DuckDB connection and intercepts command creation.

Namespace: Workspace.XBR.Xperiflow.MetaDB

Assembly: Xperiflow.dll

Declaration
public class MetaDBConnection : DbConnection, IComponent, IDbConnection, IDisposable, IAsyncDisposable

Inheritance: System.Object -> System.MarshalByRefObject -> System.ComponentModel.Component -> System.Data.Common.DbConnection

Remarks​

This class acts as a wrapper around an existing System.Data.Common.DbConnection, providing additional query parsing functionality when commands are created.

Implements: System.ComponentModel.IComponent, System.Data.IDbConnection, System.IDisposable, System.IAsyncDisposable

Properties​

ConnectionString​

When overridden in a derived class, gets or sets the string used to open the connection.

Declaration
public override string ConnectionString { get; set; }

Database​

When overridden in a derived class, 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.

Declaration
public override string Database { get; }

DataSource​

When overridden in a derived class, gets the name of the database server to which to connect.

Declaration
public override string DataSource { get; }

ServerVersion​

When overridden in a derived class, gets a string that represents the version of the server to which the object is connected.

Declaration
public override string ServerVersion { get; }

State​

Gets a value that describes the state of the connection.

Declaration
public override ConnectionState State { get; }

Methods​

ChangeDatabase(string)​

When overridden in a derived class, changes the current database for an open connection.

Declaration
public override void ChangeDatabase(string databaseName)
Parameters​
TypeNameDescription
System.StringdatabaseNameThe name of the database for the connection to use.

Open()​

When overridden in a derived class, opens a database connection with the settings specified by the System.Data.Common.DbConnection.ConnectionString.

Declaration
public override void Open()

Close()​

When overridden in a derived class, closes the connection to the database.

Declaration
public override void Close()

BeginDbTransaction(IsolationLevel)​

When overridden in a derived class, starts a database transaction.

Declaration
protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
Returns​

System.Data.Common.DbTransaction

An object representing the new transaction.

Parameters​
TypeNameDescription
System.Data.IsolationLevelisolationLevelOne of the enumeration values that specifies the isolation level for the transaction to use.

CreateDbCommand()​

Creates and returns a new database command wrapped in a Workspace.XBR.Xperiflow.MetaDB.MetaDBCommand.

Declaration
protected override DbCommand CreateDbCommand()
Remarks​

Instead of returning the raw command from the underlying connection, this method decorates it with Workspace.XBR.Xperiflow.MetaDB.MetaDBCommand to enable additional query parsing before execution.

Returns​

System.Data.Common.DbCommand

A wrapped System.Data.Common.DbCommand instance.

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.IDbConnection
  • System.IDisposable
  • System.IAsyncDisposable

Inherited Members​

  • System.Data.Common.DbConnection.BeginDbTransactionAsync(System.Data.IsolationLevel,System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.BeginTransaction
  • System.Data.Common.DbConnection.BeginTransaction(System.Data.IsolationLevel)
  • System.Data.Common.DbConnection.BeginTransactionAsync(System.Data.IsolationLevel,System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.BeginTransactionAsync(System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.ChangeDatabaseAsync(System.String,System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.CloseAsync
  • System.Data.Common.DbConnection.CreateBatch
  • System.Data.Common.DbConnection.CreateDbBatch
  • System.Data.Common.DbConnection.CreateCommand
  • System.Data.Common.DbConnection.DisposeAsync
  • System.Data.Common.DbConnection.EnlistTransaction(System.Transactions.Transaction)
  • System.Data.Common.DbConnection.GetSchema
  • System.Data.Common.DbConnection.GetSchema(System.String)
  • System.Data.Common.DbConnection.GetSchema(System.String,System.String[])
  • System.Data.Common.DbConnection.GetSchemaAsync(System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.GetSchemaAsync(System.String,System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.GetSchemaAsync(System.String,System.String[],System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.OnStateChange(System.Data.StateChangeEventArgs)
  • System.Data.Common.DbConnection.OpenAsync
  • System.Data.Common.DbConnection.OpenAsync(System.Threading.CancellationToken)
  • System.Data.Common.DbConnection.ConnectionTimeout
  • System.Data.Common.DbConnection.DbProviderFactory
  • System.Data.Common.DbConnection.CanCreateBatch
  • System.Data.Common.DbConnection.StateChange
  • 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?