AbstractDataConnection Class |
Namespace: CMS.DataEngine
public abstract class AbstractDataConnection : IDataConnection, IDisposable, INotCopyThreadItem
The AbstractDataConnection type exposes the following members.
Name | Description | |
---|---|---|
AbstractDataConnection |
Constructor.
|
Name | Description | |
---|---|---|
mCommandTimeout |
Command timeout.
| |
mConnectionString |
Connection string for specific provider.
| |
mConnectionStringName |
Connection string name
| |
mLastError |
Last connection error
| |
mNativeConnection |
Native connection object. It depends on provider type.
| |
mNestedConnections |
Nested connections indexed by the connection string [connectionString -> IDbConnection]
| |
mNestedConnectionsList |
List of nested connections
| |
mNestedOpenConnections |
List of nested connections that were automatically opened
| |
mNestedOpenTransactions |
List of nested connections that were automatically opened with transaction
| |
mUseScopeConnection |
If true, the connection uses the scope connection
|
Name | Description | |
---|---|---|
CommandTimeout |
Command timeout.
| |
ConnectionString |
Connection string for specific provider.
| |
ConnectionStringName |
Connection string name
| |
DisableConnectionDebug |
If true, the debug is disabled on this connection
| |
DisableQueryDebug |
If true, the debug of queries is disabled on this connection
| |
KeepOpen |
If true, the connection stays open even if close is requested.
| |
LocalKeepOpen |
If true, the connection stays open even if close is requested.
| |
LocalTransaction |
Transaction object of local instance.
| |
NativeConnection |
Native connection object. It depends on provider type.
| |
NativeDBConnection |
Native connection object. It depends on provider type.
| |
Transaction |
Transaction object.
| |
UseScopeConnection |
If true, the connection uses the scope connection
|
Name | Description | |
---|---|---|
AddParameters |
Adds the given parameters to the SQL command
| |
BeginTransaction |
Begins a new transaction.
| |
BeginTransaction(IsolationLevel) |
Begins a new transaction.
| |
BulkInsert |
Performs a bulk insert of the data into a target database table
| |
CheckThreadSafety |
Checks the thread safety of current operation.
| |
Close |
Closes connection to the database.
| |
CommitTransaction |
Commits current transaction.
| |
CreateCommand |
Creates a new SQL command
| |
CreateDataAdapter |
Creates a data adapter
| |
CreateNativeConnection |
Creates a new native connection
| |
CreateParameter(DataParameter) |
Creates a SQL parameter from the given data parameter
| |
CreateParameter(String, Object) |
Creates a new command parameter
| |
Dispose |
Disposes the connection object.
| |
ExecuteNonQuery |
Executes the query and returns the number of rows affected.
| |
ExecuteNonQueryAsync | An asynchronous version of ExecuteNonQuery(String, QueryDataParameters, QueryTypeEnum, Boolean) which executes the query asynchronously and returns the number of rows affected. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. | |
ExecuteQuery |
Returns result of the query.
| |
ExecuteReader |
Executes the query and returns result of the query as a DbDataReader.
| |
ExecuteReaderAsync | An asynchronous version of ExecuteReader(String, QueryDataParameters, QueryTypeEnum, CommandBehavior) which executes the query asynchronously and returns result as a DbDataReader. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. | |
ExecuteScalar |
Executes the query and returns the first column of the first row in the result set returned by the query.
Additional columns or rows are ignored.
| |
ExecuteScalarAsync | An asynchronous version of ExecuteScalar(String, QueryDataParameters, QueryTypeEnum, Boolean), which executes the query asynchronously and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. | |
GetExecutingConnection |
Gets the connection that executes the given query
| |
GetNestedConnection |
Gets the nested connection with the given connection string
| |
GetXmlSchema |
Returns XML schema for specified table.
| |
HandleDbError |
Handles the database error. Returns false, if the error was not handled
| |
HandleError |
Handles the error. Returns false, if the error was not handled
| |
IsOpen |
Returns true if connection to the database is open.
| |
IsTransaction |
Indicates if transaction is running.
| |
LoadDefaultConnectionString |
Loads the default connection string
| |
LogConnectionOperation |
Logs the connection operation to the query log.
| |
NativeConnectionExists |
Returns true if the native connection exists.
| |
NativeDBConnectionExists |
Returns true if the native connection exists.
| |
Open |
Opens connection to the database.
| |
PrepareCommand |
Prepares the SQL command for the query.
| |
RollbackTransaction |
Rollbacks current transaction.
| |
SetParameterType |
Sets the parameter type to a destination type
| |
ValidateTransaction |
Validates the transaction
|