Class TableColumn
Inheritance
System.Object
TableColumn
Implements
System.Data.IColumnMapping
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()
Assembly: ETLBox.dll
Syntax
public class TableColumn : IColumnMapping
Constructors
TableColumn()
Declaration
TableColumn(String, String)
Declaration
public TableColumn(string name, string dataType)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
dataType |
|
TableColumn(String, String, Boolean)
Declaration
public TableColumn(string name, string dataType, bool allowNulls)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
dataType |
|
System.Boolean |
allowNulls |
|
TableColumn(String, String, Boolean, Boolean)
Declaration
public TableColumn(string name, string dataType, bool allowNulls, bool isPrimaryKey)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
dataType |
|
System.Boolean |
allowNulls |
|
System.Boolean |
isPrimaryKey |
|
TableColumn(String, String, Boolean, Boolean, Boolean)
Declaration
public TableColumn(string name, string dataType, bool allowNulls, bool isPrimaryKey, bool isIdentity)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
dataType |
|
System.Boolean |
allowNulls |
|
System.Boolean |
isPrimaryKey |
|
System.Boolean |
isIdentity |
|
Properties
AllowNulls
True, if the column is nullable. By default a column is not nullable.
Declaration
public bool AllowNulls { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Collation
The collation used for the column. Leave empty if you want to use the default collation.
Declaration
public string Collation { get; set; }
Property Value
Type |
Description |
System.String |
|
A comment for the column (not supported by every database)
Declaration
public string Comment { get; set; }
Property Value
Type |
Description |
System.String |
|
ComputedColumn
The calculation if the column should be computed.
Not all databases may support this.
Declaration
public string ComputedColumn { get; set; }
Property Value
Type |
Description |
System.String |
|
DataSetColumn
Declaration
public string DataSetColumn { get; set; }
Property Value
Type |
Description |
System.String |
|
DataType
The sql data type of the column (e.g. "INT" or "VARCHAR(30)")
Declaration
public string DataType { get; set; }
Property Value
Type |
Description |
System.String |
|
DefaultValue
Define a default value for the column.
Not all databases may support this.
Declaration
public string DefaultValue { get; set; }
Property Value
Type |
Description |
System.String |
|
IdentityIncrement
Only SqlServer: The increment value for an identity column
Declaration
public int? IdentityIncrement { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
IdentitySeed
Only SqlServer: The seed for and identity column
Declaration
public int? IdentitySeed { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
InternalDataType
Postgres only: The internal data type may differ from the defined DataType.
This will return the internal used data type.
Declaration
public string InternalDataType { get; }
Property Value
Type |
Description |
System.String |
|
IsIdentity
True, if the column is used as an Identity column (auto increment in MySql or serial in Postgres)
Not every database supports this.
Declaration
public bool IsIdentity { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
IsPrimaryKey
True if the column is part of the primary key
Declaration
public bool IsPrimaryKey { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
IsUnique
The column is part of a unique constraint
Declaration
public bool IsUnique { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Name
Declaration
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
NETDataType
The corresponding .NET data type retrieved from the sql DataType.
Declaration
public Type NETDataType { get; }
Property Value
Type |
Description |
System.Type |
|
SourceColumn
Declaration
public string SourceColumn { get; set; }
Property Value
Type |
Description |
System.String |
|
Implements
System.Data.IColumnMapping