Class TableData

Defines a list of rows that can be inserted into a table

Inheritance
System.Object
TableData
Implements
System.Data.IDataReader
System.Data.IDataRecord
System.IDisposable
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 TableData : ITableData, IDataReader, IDataRecord, IDisposable

Constructors

TableData(TableDefinition)

Declaration
    public TableData(TableDefinition definition)
Parameters
TypeNameDescription
TableDefinitiondefinition

TableData(TableDefinition, Int32)

Declaration
    public TableData(TableDefinition definition, int estimatedBatchSize)
Parameters
TypeNameDescription
TableDefinitiondefinition
System.Int32estimatedBatchSize

Properties

AllowIdentityInsert

If set to true, values in an indentity column are overwriten with the provided values

Declaration
    public bool AllowIdentityInsert { get; set; }
Property Value
TypeDescription
System.Boolean

ColumnConverters

Declaration
    public Dictionary<string, Func<object, object>> ColumnConverters { get; set; }
Property Value
TypeDescription
System.Collections.Generic.Dictionary<System.String, System.Func<System.Object, System.Object>>

ColumnMapping

The column mapping

Declaration
    public IColumnMappingCollection ColumnMapping { get; }
Property Value
TypeDescription
System.Data.IColumnMappingCollection

CurrentRow

The row that is currently processed when accessing the data reader

Declaration
    public object[] CurrentRow { get; }
Property Value
TypeDescription
System.Object[]

DataIndexForColumn

Resolves the index number for a column name

Declaration
    public Dictionary<string, int> DataIndexForColumn { get; set; }
Property Value
TypeDescription
System.Collections.Generic.Dictionary<System.String, System.Int32>

Definition

Definition of the destination table

Declaration
    public TableDefinition Definition { get; set; }
Property Value
TypeDescription
TableDefinition

Depth

Declaration
    public int Depth { get; }
Property Value
TypeDescription
System.Int32

DestinationTableName

The name of the destination table

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

FieldCount

Declaration
    public int FieldCount { get; }
Property Value
TypeDescription
System.Int32

IsClosed

Declaration
    public bool IsClosed { get; }
Property Value
TypeDescription
System.Boolean

Item[Int32]

Declaration
    public object this[int i] { get; }
Parameters
TypeNameDescription
System.Int32i
Property Value
TypeDescription
System.Object

Item[String]

Declaration
    public object this[string name] { get; }
Parameters
TypeNameDescription
System.Stringname
Property Value
TypeDescription
System.Object

ReadIndex

The row index of the current row

Declaration
    public int ReadIndex { get; }
Property Value
TypeDescription
System.Int32

RecordsAffected

Declaration
    public int RecordsAffected { get; }
Property Value
TypeDescription
System.Int32

Rows

Rows/Columns ready for bulk insert

Declaration
    public List<object[]> Rows { get; set; }
Property Value
TypeDescription
System.Collections.Generic.List<System.Object[]>

Methods

Close()

Declaration
    public void Close()

Dispose()

Declaration
    public void Dispose()

Dispose(Boolean)

Declaration
    protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.Booleandisposing

GetBoolean(Int32)

Declaration
    public bool GetBoolean(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Boolean

GetByte(Int32)

Declaration
    public byte GetByte(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Byte

GetBytes(Int32, Int64, Byte[], Int32, Int32)

Declaration
    public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
Parameters
TypeNameDescription
System.Int32i
System.Int64fieldOffset
System.Byte[]buffer
System.Int32bufferoffset
System.Int32length
Returns
TypeDescription
System.Int64

GetChar(Int32)

Declaration
    public char GetChar(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Char

GetChars(Int32, Int64, Char[], Int32, Int32)

Declaration
    public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
Parameters
TypeNameDescription
System.Int32i
System.Int64fieldoffset
System.Char[]buffer
System.Int32bufferoffset
System.Int32length
Returns
TypeDescription
System.Int64

GetData(Int32)

Declaration
    public IDataReader GetData(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Data.IDataReader

GetDataTypeName(Int32)

Declaration
    public string GetDataTypeName(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.String

GetDataTypeName(String)

Resolves the data type name for a column

Declaration
    public string GetDataTypeName(string columnName)
Parameters
TypeNameDescription
System.StringcolumnName

Column name

Returns
TypeDescription
System.String

Data type name

GetDateTime(Int32)

Declaration
    public DateTime GetDateTime(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.DateTime

GetDecimal(Int32)

Declaration
    public decimal GetDecimal(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Decimal

GetDouble(Int32)

Declaration
    public double GetDouble(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Double

GetFieldType(Int32)

Declaration
    public Type GetFieldType(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Type

GetFloat(Int32)

Declaration
    public float GetFloat(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Single

GetGuid(Int32)

Declaration
    public Guid GetGuid(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Guid

GetInt16(Int32)

Declaration
    public short GetInt16(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Int16

GetInt32(Int32)

Declaration
    public int GetInt32(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Int32

GetInt64(Int32)

Declaration
    public long GetInt64(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Int64

GetName(Int32)

Declaration
    public string GetName(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.String

GetOrdinal(String)

Declaration
    public int GetOrdinal(string name)
Parameters
TypeNameDescription
System.Stringname
Returns
TypeDescription
System.Int32

GetSchemaTable()

Declaration
    public DataTable GetSchemaTable()
Returns
TypeDescription
System.Data.DataTable

GetString(Int32)

Declaration
    public string GetString(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.String

GetValue(Int32)

Declaration
    public object GetValue(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Object

GetValues(Object[])

Declaration
    public int GetValues(object[] values)
Parameters
TypeNameDescription
System.Object[]values
Returns
TypeDescription
System.Int32

IsDBNull(Int32)

Declaration
    public bool IsDBNull(int i)
Parameters
TypeNameDescription
System.Int32i
Returns
TypeDescription
System.Boolean

NextResult()

Declaration
    public bool NextResult()
Returns
TypeDescription
System.Boolean

Read()

Declaration
    public bool Read()
Returns
TypeDescription
System.Boolean

Implements

System.Data.IDataReader
System.Data.IDataRecord
System.IDisposable