Class TruncateTableTask

Truncates a table.

Inheritance
object
TruncateTableTask
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.ControlFlow.Tasks
Assembly: ETLBox.dll
Syntax
    public sealed class TruncateTableTask : ControlFlowTask, ILoggableTask
Examples
TruncateTableTask.Truncate("demo.table1");

Constructors

TruncateTableTask()

Declaration
    public TruncateTableTask()
Examples
TruncateTableTask.Truncate("demo.table1");

TruncateTableTask(string)

Declaration
    public TruncateTableTask(string tableName)
Parameters
TypeNameDescription
stringtableName

Sets the TableName

Properties

Sql

Sql code that is used when the task is executed.

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

TableName

Name of the table that should be truncated

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

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
    public override string TaskName { get; set; }
Property Value
TypeDescription
string
Overrides

TN

The formatted table table name

Declaration
    public ObjectNameDescriptor TN { get; }
Property Value
TypeDescription
ObjectNameDescriptor

Methods

Truncate(IConnectionManager, string)

Execute a table truncation

Declaration
    public static void Truncate(IConnectionManager connection, string tableName)
Parameters
TypeNameDescription
IConnectionManagerconnection

Database connection manager to connect with the database

stringtableName

Table name that should be truncated

Truncate(string)

Execute a table truncation

Declaration
    public static void Truncate(string tableName)
Parameters
TypeNameDescription
stringtableName

Table that should be truncated

TruncateAsync(IConnectionManager, string)

Declaration
    public static void TruncateAsync(IConnectionManager connection, string tableName)
Parameters
TypeNameDescription
IConnectionManagerconnection
stringtableName
Examples
TruncateTableTask.Truncate("demo.table1");

Implements