ITableData

Interface ITableData

A list of rows and a column mapping ready for bulk insert

Namespace: ETLBox
Assembly: ETLBox.dll
Syntax
    public interface ITableData : IDataReader, IDataRecord, IDisposable

Properties

AllowIdentityInsert

If set to true, the connection manager will try to enable identity inserts for the corresponding table (not supported by every database)

Declaration
    bool AllowIdentityInsert { get; set; }
Property Value
TypeDescription
bool

ColumnMapping

The column mapping

Declaration
    IColumnMappingCollection ColumnMapping { get; }
Property Value
TypeDescription
IColumnMappingCollection

CurrentRow

The row that is currently processed when accessing the data reader

Declaration
    object[] CurrentRow { get; }
Property Value
TypeDescription
object[]

DataIndexForColumn

Resolves the index number for a column name

Declaration
    Dictionary<string, int> DataIndexForColumn { get; }
Property Value
TypeDescription
Dictionary<string, int>

Definition

Definition of the destination table

Declaration
    TableDefinition Definition { get; }
Property Value
TypeDescription
TableDefinition

DestinationTableName

The name of the destination table

Declaration
    string DestinationTableName { get; }
Property Value
TypeDescription
string

KeepIdentity

By default, identity columns are included. If set to false, identity columns will be ignored

Declaration
    bool KeepIdentity { get; set; }
Property Value
TypeDescription
bool

ReadIndex

The row index of the current row

Declaration
    int ReadIndex { get; }
Property Value
TypeDescription
int

Rows

Rows/Columns ready for bulk insert

Declaration
    List<object[]> Rows { get; set; }
Property Value
TypeDescription
List<object[]>

ValueGeneratedColumnData

A sorted list which contains data for each value generated column (the order in the object array is the same as defined in ValueGeneratedColumnNames). The key of the list is a unique sequence number, and the order matches also to each entry in the Rows.

Declaration
    SortedList<int, object[]> ValueGeneratedColumnData { get; set; }
Property Value
TypeDescription
SortedList<int, object[]>

ValueGeneratedColumnNames

A collection of all column names that are value generated columns (e.g. columns with a COMPUTED or DEFAULT value)

Declaration
    ICollection<string> ValueGeneratedColumnNames { get; }
Property Value
TypeDescription
ICollection<string>

Methods

AddSequenceColumn(string)

Allows to name a column that is specifically used as a sequence column. The column will then be treated differently.

Declaration
    void AddSequenceColumn(string columnName)
Parameters
TypeNameDescription
stringcolumnName

GetDataTypeName(string)

Resolves the data type name for a column

Declaration
    string GetDataTypeName(string columnName)
Parameters
TypeNameDescription
stringcolumnName

Column name

Returns
TypeDescription
string

Data type name

GetTableColumn(string)

Resolves the column in the table definition

Declaration
    TableColumn GetTableColumn(string columnName)
Parameters
TypeNameDescription
stringcolumnName

Column name

Returns
TypeDescription
TableColumn

RewindReadIndex()

The IDataReader is iterated via the Read() method - once the last record was read, the Read() will return false. If you want to iterate again, you can use this method to "rewind" and start with the first record again.

Declaration
    void RewindReadIndex()