ITableData
Interface ITableData
A list of rows and a column mapping ready for bulk insert
Inherited Members
Namespace: ETLBox
Assembly: ETLBox.dll
Syntax
public interface ITableData : IDataReader, IDataRecord, IDisposableProperties
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
| Type | Description |
|---|---|
| bool |
ColumnMapping
The column mapping
Declaration
IColumnMappingCollection ColumnMapping { get; }Property Value
| Type | Description |
|---|---|
| IColumnMappingCollection |
CurrentRow
The row that is currently processed when accessing the data reader
Declaration
object[] CurrentRow { get; }Property Value
| Type | Description |
|---|---|
| object[] |
DataIndexForColumn
Resolves the index number for a column name
Declaration
Dictionary<string, int> DataIndexForColumn { get; }Property Value
| Type | Description |
|---|---|
| Dictionary<string, int> |
Definition
Definition of the destination table
Declaration
TableDefinition Definition { get; }Property Value
| Type | Description |
|---|---|
| TableDefinition |
DestinationTableName
The name of the destination table
Declaration
string DestinationTableName { get; }Property Value
| Type | Description |
|---|---|
| string |
KeepIdentity
By default, identity columns are included. If set to false, identity columns will be ignored
Declaration
bool KeepIdentity { get; set; }Property Value
| Type | Description |
|---|---|
| bool |
ReadIndex
The row index of the current row
Declaration
int ReadIndex { get; }Property Value
| Type | Description |
|---|---|
| int |
Rows
Rows/Columns ready for bulk insert
Declaration
List<object[]> Rows { get; set; }Property Value
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| 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
| Type | Name | Description |
|---|---|---|
| string | columnName |
GetDataTypeName(string)
Resolves the data type name for a column
Declaration
string GetDataTypeName(string columnName)Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName | Column name |
Returns
| Type | Description |
|---|---|
| string | Data type name |
GetTableColumn(string)
Resolves the column in the table definition
Declaration
TableColumn GetTableColumn(string columnName)Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName | Column name |
Returns
| Type | Description |
|---|---|
| TableColumn |
RewindReadIndex(int)
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(int position)Parameters
| Type | Name | Description |
|---|---|---|
| int | position |