Class CreateProcedureTask

Creates or updates a procedure.

Inheritance
object
CreateProcedureTask
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
Assembly: ETLBox.dll
Syntax
    public sealed class CreateProcedureTask : ControlFlowTask, ILoggableTask
Examples
CRUDProcedureTask.CreateOrAlter("demo.proc1", "select 1 as test");

Constructors

CreateProcedureTask()

Declaration
    public CreateProcedureTask()
Examples
CRUDProcedureTask.CreateOrAlter("demo.proc1", "select 1 as test");

CreateProcedureTask(ProcedureDefinition)

Declaration
    public CreateProcedureTask(ProcedureDefinition definition)
Parameters
TypeNameDescription
ProcedureDefinitiondefinition
Examples
CRUDProcedureTask.CreateOrAlter("demo.proc1", "select 1 as test");

CreateProcedureTask(string, string, IList<ProcedureParameter>)

Declaration
    public CreateProcedureTask(string procedureName, string procedureDefinition, IList<ProcedureParameter> procedureParameter)
Parameters
TypeNameDescription
stringprocedureName
stringprocedureDefinition
System.Collections.Generic.IList<T><ProcedureParameter>procedureParameter
Examples
CRUDProcedureTask.CreateOrAlter("demo.proc1", "select 1 as test");

CreateProcedureTask(string, string)

Declaration
    public CreateProcedureTask(string procedureName, string procedureDefinition)
Parameters
TypeNameDescription
stringprocedureName
stringprocedureDefinition
Examples
CRUDProcedureTask.CreateOrAlter("demo.proc1", "select 1 as test");

Properties

PN

The formatted procedure name

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

ProcedureDefinition

The sql code of the procedure

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

ProcedureName

The name of the procedure

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

ProcedureOptions

Declaration
    public string ProcedureOptions { get; set; }
Property Value
TypeDescription
string
Examples
CRUDProcedureTask.CreateOrAlter("demo.proc1", "select 1 as test");

ProcedureParameters

The parameters for the procedure

Declaration
    public ICollection<ProcedureParameter> ProcedureParameters { get; set; }
Property Value
TypeDescription
System.Collections.Generic.ICollection<T><ProcedureParameter>

Sql

The sql code that is used to create/update the procedure.

Declaration
    public string Sql { get; }
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

Methods

CreateOrAlter(ProcedureDefinition)

Creates or updates a procedure.

Declaration
    public static void CreateOrAlter(ProcedureDefinition procedure)
Parameters
TypeNameDescription
ProcedureDefinitionprocedure

The procedure definition object containing procedure name, code and potential parameters

CreateOrAlter(IConnectionManager, ProcedureDefinition)

Creates or updates a procedure.

Declaration
    public static void CreateOrAlter(IConnectionManager connectionManager, ProcedureDefinition procedure)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

ProcedureDefinitionprocedure

The procedure definition object containing procedure name, code and potential parameters

CreateOrAlter(IConnectionManager, string, string, IList<ProcedureParameter>)

Creates or updates a procedure.

Declaration
    public static void CreateOrAlter(IConnectionManager connectionManager, string procedureName, string procedureDefinition, IList<ProcedureParameter> procedureParameter)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

stringprocedureName

The name of the procedure

stringprocedureDefinition

The sql code of the procedure

System.Collections.Generic.IList<T><ProcedureParameter>procedureParameter

A list of the parameters for the procedure

CreateOrAlter(IConnectionManager, string, string)

Creates or updates a procedure.

Declaration
    public static void CreateOrAlter(IConnectionManager connectionManager, string procedureName, string procedureDefinition)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

stringprocedureName

The name of the procedure

stringprocedureDefinition

The sql code of the procedure

CreateOrAlter(string, string, IList<ProcedureParameter>)

Creates or updates a procedure.

Declaration
    public static void CreateOrAlter(string procedureName, string procedureDefinition, IList<ProcedureParameter> procedureParameter)
Parameters
TypeNameDescription
stringprocedureName

The name of the procedure

stringprocedureDefinition

The sql code of the procedure

System.Collections.Generic.IList<T><ProcedureParameter>procedureParameter

A list of the parameters for the procedure

CreateOrAlter(string, string)

Creates or updates a procedure.

Declaration
    public static void CreateOrAlter(string procedureName, string procedureDefinition)
Parameters
TypeNameDescription
stringprocedureName

The name of the procedure

stringprocedureDefinition

The sql code of the procedure

Implements