Class SqlServerBulkUpdate
Class for fast data update for SQL Server.
Inheritance
System.Object
SqlServerBulkUpdate
Assembly: Kros.Utils.dll
Syntax
public class SqlServerBulkUpdate : BulkUpdateBase, IBulkUpdate, IDisposable
Examples
Constructors
SqlServerBulkUpdate(SqlConnection)
Declaration
public SqlServerBulkUpdate(SqlConnection connection)
Parameters
Type |
Name |
Description |
System.Data.SqlClient.SqlConnection |
connection |
Database connection where data will be updated, connection has to be opened.
If transaction is running on connection, contructor with defined external transaction has to be used.
|
SqlServerBulkUpdate(SqlConnection, SqlTransaction)
Initialize new instance of SqlServerBulkUpdate with database connection connection
,
and external transaction externalTransaction
.
Declaration
public SqlServerBulkUpdate(SqlConnection connection, SqlTransaction externalTransaction)
Parameters
Type |
Name |
Description |
System.Data.SqlClient.SqlConnection |
connection |
Database connection where data will be updated, connection has to be opened.
If transaction is running on connection, transaction has to be defined in externalTransaction .
|
System.Data.SqlClient.SqlTransaction |
externalTransaction |
External transaction, in which bulk update is executed.
|
SqlServerBulkUpdate(String)
Declaration
public SqlServerBulkUpdate(string connectionString)
Parameters
Type |
Name |
Description |
System.String |
connectionString |
Connection string for database connection.
|
Methods
CreateBulkInsert()
Declaration
protected override IBulkInsert CreateBulkInsert()
Returns
Overrides
CreateCommandForPrimaryKey()
Declaration
protected override IDbCommand CreateCommandForPrimaryKey()
Returns
Type |
Description |
System.Data.IDbCommand |
|
Overrides
CreateTempTable(IDataReader, String)
Declaration
protected override void CreateTempTable(IDataReader reader, string tempTableName)
Parameters
Type |
Name |
Description |
System.Data.IDataReader |
reader |
|
System.String |
tempTableName |
|
Overrides
DoneTempTableAsync(String, Boolean)
Declaration
protected override Task DoneTempTableAsync(string tempTableName, bool useAsync)
Parameters
Type |
Name |
Description |
System.String |
tempTableName |
|
System.Boolean |
useAsync |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
GetTempTableName()
Declaration
protected override string GetTempTableName()
Returns
Type |
Description |
System.String |
|
Overrides
InvokeAction(String)
Declaration
protected override void InvokeAction(string tempTableName)
Parameters
Type |
Name |
Description |
System.String |
tempTableName |
|
Overrides
UpdateDestinationTableAsync(IDataReader, String, Boolean)
Declaration
protected override Task UpdateDestinationTableAsync(IDataReader reader, string tempTableName, bool useAsync)
Parameters
Type |
Name |
Description |
System.Data.IDataReader |
reader |
|
System.String |
tempTableName |
|
System.Boolean |
useAsync |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Implements