C# Class DataTableWriter.Adapters.DbAdapter

A simple database adapter to manage connections as well as exposing table manipulation functionality that other classes can leverage.
Inheritance: IDbAdapter
Afficher le fichier Open project: tableau/TabMon Class Usage Examples

Méthodes publiques

Méthode Description
AddColumnsToTableToMatchSchema ( string tableName, DataTable schema ) : void

Adds columns to an existing database table to include all columns present in a given schema.

CloseConnection ( ) : void

Close the database connection.

DbAdapter ( DbDriverType driverType, IDbConnectionInfo connectionInfo ) : System
Dispose ( ) : void
ExistsColumn ( string dbTableName, DataColumn column ) : bool

Indicates whether a column with a given name already exists in a database table.

IsConnectionOpen ( ) : bool

Returns true if database connection is in an open state.

OpenConnection ( ) : void

Open the database connection.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
AddColumn ( string dbTableName, DataColumn column ) : void
ClusterIndex ( string tableName, string indexName ) : void
CreateIndexOnTable ( string tableName, string columnName, string indexName ) : void
CreateTable ( DataTable schema, bool generateIdentity = true ) : void
DeleteRowsOlderThan ( string tableName, int threshold ) : void
DropIndex ( string indexName ) : void
ExistsTable ( string tableName ) : bool
GetIndexes ( string tableName ) : IList
GetSchema ( string tableName ) : DataTable
InsertRow ( string dbTableName, DataRow row ) : void

Method Details

AddColumnsToTableToMatchSchema() public méthode

Adds columns to an existing database table to include all columns present in a given schema.
public AddColumnsToTableToMatchSchema ( string tableName, DataTable schema ) : void
tableName string The name of the table to add columns to.
schema System.Data.DataTable The schema to use as a point of reference.
Résultat void

CloseConnection() public méthode

Close the database connection.
public CloseConnection ( ) : void
Résultat void

DbAdapter() public méthode

public DbAdapter ( DbDriverType driverType, IDbConnectionInfo connectionInfo ) : System
driverType DbDriverType
connectionInfo IDbConnectionInfo
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

ExistsColumn() public méthode

Indicates whether a column with a given name already exists in a database table.
public ExistsColumn ( string dbTableName, DataColumn column ) : bool
dbTableName string The table to check for existence of the column.
column System.Data.DataColumn The column to check for a match.
Résultat bool

IsConnectionOpen() public méthode

Returns true if database connection is in an open state.
public IsConnectionOpen ( ) : bool
Résultat bool

OpenConnection() public méthode

Open the database connection.
public OpenConnection ( ) : void
Résultat void