C# Class SqlFu.Executors.SqlFuConnection

Inheritance: System.Data.Common.DbConnection
ファイルを表示 Open project: sapiens/SqlFu Class Usage Examples

Public Methods

Method Description
BeginSqlFuTransaction ( IsolationLevel isolationLevel = null ) : DbTransaction
ChangeDatabase ( string databaseName ) : void

Changes the current database for an open connection.

Close ( ) : void

Closes the connection to the database. This is the preferred method of closing any open connection.

Open ( ) : void

Opens a database connection with the settings specified by the P:System.Data.Common.DbConnection.ConnectionString.

SqlFuConnection ( DbConnection cnx, IDbProvider provider ) : System
SqlFuConnection ( IDbProvider provider, string cnxString ) : System

Protected Methods

Method Description
BeginDbTransaction ( IsolationLevel isolationLevel ) : DbTransaction

Starts a database transaction.

CreateDbCommand ( ) : DbCommand

Creates and returns a T:System.Data.Common.DbCommand object associated with the current connection.

Dispose ( bool disposing ) : void

Private Methods

Method Description
Commit ( ) : void
EnsureTransaction ( ) : void
Init ( string cnxString, IDbProvider provider ) : void
Rollback ( ) : void

Method Details

BeginDbTransaction() protected method

Starts a database transaction.
protected BeginDbTransaction ( IsolationLevel isolationLevel ) : DbTransaction
isolationLevel IsolationLevel Specifies the isolation level for the transaction.
return System.Data.Common.DbTransaction

BeginSqlFuTransaction() public method

public BeginSqlFuTransaction ( IsolationLevel isolationLevel = null ) : DbTransaction
isolationLevel IsolationLevel
return System.Data.Common.DbTransaction

ChangeDatabase() public method

Changes the current database for an open connection.
public ChangeDatabase ( string databaseName ) : void
databaseName string Specifies the name of the database for the connection to use.
return void

Close() public method

Closes the connection to the database. This is the preferred method of closing any open connection.
The connection-level error that occurred while opening the connection.
public Close ( ) : void
return void

CreateDbCommand() protected method

Creates and returns a T:System.Data.Common.DbCommand object associated with the current connection.
protected CreateDbCommand ( ) : DbCommand
return System.Data.Common.DbCommand

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Open() public method

Opens a database connection with the settings specified by the P:System.Data.Common.DbConnection.ConnectionString.
public Open ( ) : void
return void

SqlFuConnection() public method

public SqlFuConnection ( DbConnection cnx, IDbProvider provider ) : System
cnx System.Data.Common.DbConnection
provider IDbProvider
return System

SqlFuConnection() public method

public SqlFuConnection ( IDbProvider provider, string cnxString ) : System
provider IDbProvider
cnxString string
return System