DbTask

Class DbTask

Implements
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
    public abstract class DbTask : ControlFlowTask, ILoggableTask

Constructors

DbTask()

Declaration
    public DbTask()

DbTask(string)

Declaration
    public DbTask(string sql)
Parameters
TypeNameDescription
stringsql

DbTask(string, Action, Action, params Action<object>[])

Declaration
    public DbTask(string sql, Action beforeRowReadAction, Action afterRowReadAction, params Action<object>[] actions)
Parameters
TypeNameDescription
stringsql
ActionbeforeRowReadAction
ActionafterRowReadAction
Action<object>[]actions

DbTask(string, params Action<object>[])

Declaration
    public DbTask(string sql, params Action<object>[] actions)
Parameters
TypeNameDescription
stringsql
Action<object>[]actions

DbTask(string, string)

Declaration
    public DbTask(string name, string sql)
Parameters
TypeNameDescription
stringname
stringsql

Properties

Actions

Declaration
    public ICollection<Action<object>> Actions { get; set; }
Property Value
TypeDescription
ICollection<Action<object>>

AfterRowReadAction

Declaration
    public Action AfterRowReadAction { get; set; }
Property Value
TypeDescription
Action

BeforeRowReadAction

Declaration
    public Action BeforeRowReadAction { get; set; }
Property Value
TypeDescription
Action

Limit

Declaration
    public int Limit { get; set; }
Property Value
TypeDescription
int

Parameter

Declaration
    public IEnumerable<QueryParameter> Parameter { get; set; }
Property Value
TypeDescription
IEnumerable<QueryParameter>

RowsAffected

Declaration
    public int? RowsAffected { get; }
Property Value
TypeDescription
int?

Sql

Declaration
    public string Sql { get; set; }
Property Value
TypeDescription
string

Methods

BulkDelete(ITableData)

Declaration
    public void BulkDelete(ITableData data)
Parameters
TypeNameDescription
ITableDatadata

BulkInsert(ITableData)

Declaration
    public void BulkInsert(ITableData data)
Parameters
TypeNameDescription
ITableDatadata

BulkSelect(ITableData, ICollection<string>)

Declaration
    public void BulkSelect(ITableData data, ICollection<string> selectColumnNames)
Parameters
TypeNameDescription
ITableDatadata
ICollection<string>selectColumnNames

BulkUpdate(ITableData, ICollection<string>, ICollection<string>)

Declaration
    public void BulkUpdate(ITableData data, ICollection<string> setColumnNames, ICollection<string> joinColumnNames)
Parameters
TypeNameDescription
ITableDatadata
ICollection<string>setColumnNames
ICollection<string>joinColumnNames

ExecuteNonQuery()

Declaration
    public int ExecuteNonQuery()
Returns
TypeDescription
int

ExecuteNonQueryAsync()

Declaration
    public Task<int> ExecuteNonQueryAsync()
Returns
TypeDescription
Task<int>

ExecuteReader()

Declaration
    public void ExecuteReader()

ExecuteReaderAsync()

Declaration
    public Task ExecuteReaderAsync()
Returns
TypeDescription
Task

ExecuteScalar()

Declaration
    public object ExecuteScalar()
Returns
TypeDescription
object

ExecuteScalarAsync()

Declaration
    public Task<object> ExecuteScalarAsync()
Returns
TypeDescription
Task<object>

ExecuteScalarAsync<T>()

Declaration
    public Task<T> ExecuteScalarAsync<T>()
Returns
TypeDescription
Task<T>
Type Parameters
NameDescription
T

ExecuteScalar<T>()

Declaration
    public T ExecuteScalar<T>()
Returns
TypeDescription
T
Type Parameters
NameDescription
T

LogErrorsAndClose(string, Action<IConnectionManager>)

Declaration
    public void LogErrorsAndClose(string sqlOperationType, Action<IConnectionManager> syncAction = null)
Parameters
TypeNameDescription
stringsqlOperationType
Action<IConnectionManager>syncAction

LogErrorsAndCloseAsync(string, Func<IConnectionManager, Task>)

Declaration
    public Task LogErrorsAndCloseAsync(string sqlOperationType, Func<IConnectionManager, Task> asyncAction = null)
Parameters
TypeNameDescription
stringsqlOperationType
Func<IConnectionManager, Task>asyncAction
Returns
TypeDescription
Task

LogErrorsAndCloseCoreAsync(string, Action<IConnectionManager>, Func<IConnectionManager, Task>, bool)

Declaration
    public Task LogErrorsAndCloseCoreAsync(string sqlOperationType, Action<IConnectionManager> syncAction = null, Func<IConnectionManager, Task> asyncAction = null, bool sync = false)
Parameters
TypeNameDescription
stringsqlOperationType
Action<IConnectionManager>syncAction
Func<IConnectionManager, Task>asyncAction
boolsync
Returns
TypeDescription
Task

Implements