Class CompositeDataReader
Chains multiple IDataReader instances into one forward-only reader so bulk loaders and file writers can process many source files without first merging them into a DataTable.
Namespace: Workspace.XBR.Xperiflow.Etl.Tabular
Assembly: Xperiflow.dll
public class CompositeDataReader : IDataReader, IDataRecord, IDisposable
Implements:
System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable
Properties
this[int]
Gets the column located at the specified index.
public object this[int i] { get; }
this[string]
Gets the column with the specified name.
public object this[string name] { get; }
Depth
Gets a value indicating the depth of nesting for the current row.
public int Depth { get; }
IsClosed
Gets a value indicating whether the data reader is closed.
public bool IsClosed { get; }
RecordsAffected
Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
public int RecordsAffected { get; }
FieldCount
Gets the number of columns in the current row.
public int FieldCount { get; }
Methods
Read()
Advances the System.Data.IDataReader to the next record.
public bool Read()
Returns
System.Boolean
true if there are more rows; otherwise, false.
IsDBNull(int)
Return whether the specified field is set to null.
public bool IsDBNull(int i)
Returns
System.Boolean
true if the specified field is set to null; otherwise, false.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetValue(int)
Returns the value of the specified field.
public object GetValue(int i)
Returns
System.Object
The field value.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetOrdinal(string)
Return the index of the named field.
public int GetOrdinal(string name)
Returns
System.Int32
The index of the named field.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the field to find. |
GetName(int)
Gets the name for the field to find.
public string GetName(int i)
Returns
System.String
The name of the field or the empty string (""), if there is no value to return.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetFieldType(int)
Gets the System.Type information corresponding to the type of System.Object that would be returned from System.Data.IDataRecord.GetValue(System.Int32).
public Type GetFieldType(int i)
Returns
System.Type
The System.Type information corresponding to the type of System.Object that would be returned from System.Data.IDataRecord.GetValue(System.Int32).
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetBoolean(int)
Gets the value of the specified column as a Boolean.
public bool GetBoolean(int i)
Returns
System.Boolean
The value of the column.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The zero-based column ordinal. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetByte(int)
Gets the 8-bit unsigned integer value of the specified column.
public byte GetByte(int i)
Returns
System.Byte
The 8-bit unsigned integer value of the specified column.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The zero-based column ordinal. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetBytes(int, long, byte[], int, int)
Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset.
public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
Returns
System.Int64
The actual number of bytes read.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The zero-based column ordinal. |
System.Int64 | fieldOffset | The index within the field from which to start the read operation. |
System.Byte[] | buffer | The buffer into which to read the stream of bytes. |
System.Int32 | bufferoffset | The index for buffer to start the read operation. |
System.Int32 | length | The number of bytes to read. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetChar(int)
Gets the character value of the specified column.
public char GetChar(int i)
Returns
System.Char
The character value of the specified column.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The zero-based column ordinal. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetChars(int, long, char[], int, int)
Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.
public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
Returns
System.Int64
The actual number of characters read.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The zero-based column ordinal. |
System.Int64 | fieldoffset | The index within the row from which to start the read operation. |
System.Char[] | buffer | The buffer into which to read the stream of bytes. |
System.Int32 | bufferoffset | The index for buffer to start the read operation. |
System.Int32 | length | The number of bytes to read. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetData(int)
Returns an System.Data.IDataReader for the specified column ordinal.
public IDataReader GetData(int i)
Returns
System.Data.IDataReader
The System.Data.IDataReader for the specified column ordinal.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetDataTypeName(int)
Gets the data type information for the specified field.
public string GetDataTypeName(int i)
Returns
System.String
The data type information for the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetDateTime(int)
Gets the date and time data value of the specified field.
public DateTime GetDateTime(int i)
Returns
System.DateTime
The date and time data value of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetDecimal(int)
Gets the fixed-position numeric value of the specified field.
public decimal GetDecimal(int i)
Returns
System.Decimal
The fixed-position numeric value of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetDouble(int)
Gets the double-precision floating point number of the specified field.
public double GetDouble(int i)
Returns
System.Double
The double-precision floating point number of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetFloat(int)
Gets the single-precision floating point number of the specified field.
public float GetFloat(int i)
Returns
System.Single
The single-precision floating point number of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetGuid(int)
Returns the GUID value of the specified field.
public Guid GetGuid(int i)
Returns
System.Guid
The GUID value of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetInt16(int)
Gets the 16-bit signed integer value of the specified field.
public short GetInt16(int i)
Returns
System.Int16
The 16-bit signed integer value of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetInt32(int)
Gets the 32-bit signed integer value of the specified field.
public int GetInt32(int i)
Returns
System.Int32
The 32-bit signed integer value of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetInt64(int)
Gets the 64-bit signed integer value of the specified field.
public long GetInt64(int i)
Returns
System.Int64
The 64-bit signed integer value of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetValues(object[])
Populates an array of objects with the column values of the current record.
public int GetValues(object[] values)
Returns
System.Int32
The number of instances of System.Object in the array.
Parameters
| Type | Name | Description |
|---|---|---|
System.Object[] | values | An array of System.Object to copy the attribute fields into. |
GetString(int)
Gets the string value of the specified field.
public string GetString(int i)
Returns
System.String
The string value of the specified field.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | i | The index of the field to find. |
Exceptions
System.IndexOutOfRangeException
The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.
GetSchemaTable()
Returns a System.Data.DataTable that describes the column metadata of the System.Data.IDataReader.
Returns null if the executed command returned no resultset, or after System.Data.IDataReader.NextResult returns false.
public DataTable GetSchemaTable()
Returns
System.Data.DataTable
A System.Data.DataTable that describes the column metadata.
Exceptions
System.InvalidOperationException
The System.Data.IDataReader is closed.
NextResult()
Advances the data reader to the next result, when reading the results of batch SQL statements.
public bool NextResult()
Returns
System.Boolean
true if there are more rows; otherwise, false.
Close()
Closes the System.Data.IDataReader Object.
public void Close()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Implements
System.Data.IDataReaderSystem.Data.IDataRecordSystem.IDisposable
Inherited Members
System.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)System.Object.ToString