Class TableDefinition

A definition for a table in a database

Inheritance
System.Object
TableDefinition
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
    public class TableDefinition

Constructors

TableDefinition()

Declaration
    public TableDefinition()

TableDefinition(String)

Declaration
    public TableDefinition(string name)
Parameters
TypeNameDescription
System.Stringname

TableDefinition(String, List<TableColumn>)

Declaration
    public TableDefinition(string name, List<TableColumn> columns)
Parameters
TypeNameDescription
System.Stringname
System.Collections.Generic.List<TableColumn>columns

Properties

Columns

The columns of the table

Declaration
    public List<TableColumn> Columns { get; set; }
Property Value
TypeDescription
System.Collections.Generic.List<TableColumn>

Name

The name of the table

Declaration
    public string Name { get; set; }
Property Value
TypeDescription
System.String

PrimaryKeyConstraintName

The constraint name for the primary key

Declaration
    public string PrimaryKeyConstraintName { get; set; }
Property Value
TypeDescription
System.String

UniqueKeyConstraintName

The constraint name for the unique columns

Declaration
    public string UniqueKeyConstraintName { get; set; }
Property Value
TypeDescription
System.String

Methods

CreateTable()

Uses the CreateTableTask to create a table based on the current definition.

Declaration
    public void CreateTable()

CreateTable(IConnectionManager)

Uses the CreateTableTask to create a table based on the current definition.

Declaration
    public void CreateTable(IConnectionManager connectionManager)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

FromTableName(IConnectionManager, String)

Gather a table definition from an existing table in the database.

Declaration
    public static TableDefinition FromTableName(IConnectionManager connection, string tableName)
Parameters
TypeNameDescription
IConnectionManagerconnection

The connection manager of the database you want to connect

System.StringtableName

A name of an existing table in the database

Returns
TypeDescription
TableDefinition