Class DeephavenDataReader
Reads a forward-only stream of rows from a Deephaven data source.
Inheritance
Namespace: Deephaven.Connector
Assembly: Deephaven.Connector.dll
Syntax
public class DeephavenDataReader : DbDataReader
Remarks
The class incrementally reads a consistent snapshot of a Deephaven table (in chunks consistent with the specified FetchSize). Ticking tables can be queried, but it does not provide streaming data.
Properties
Depth
Gets a value indicating the depth of nesting for the current row. Depth greater than zero not presently supported, will always return zero.
Declaration
public override int Depth { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
FetchSize
Gets or sets the fetch size. Rows will be copied from the server in chunks according to this value. Default value is 10,000. Larger or smaller values may be optimal depending on memory, network and table properties (encoded size of data).
Declaration
public int FetchSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
FieldCount
Gets the number of columns in the current row.
Declaration
public override int FieldCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
HasRows
Gets a value that indicates whether this
Declaration
public override bool HasRows { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsClosed
Gets a value indicating whether the
Declaration
public override bool IsClosed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Item[Int32]
Gets the value of the specified column as an instance of Object.
Declaration
public override object this[int ordinal] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Property Value
| Type | Description |
|---|---|
| System.Object | The value of the specified column. |
Item[String]
Gets the value of the specified column as an instance of Object.
Declaration
public override object this[string name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the column. |
Property Value
| Type | Description |
|---|---|
| System.Object | The value of the specified column. |
RecordsAffected
Gets the number of rows changed, inserted, or deleted by execution of the statement. Since updates are not presently supported, always returns -1.
Declaration
public override int RecordsAffected { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
Close()
Closes the DeephavenDataReader object.
Declaration
public override void Close()
GetBoolean(Int32)
Gets the value of the specified column as a Boolean.
Declaration
public override bool GetBoolean(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Boolean | The value of the specified column. |
GetByte(Int32)
Gets the value of the specified column as a byte.
Declaration
public override byte GetByte(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Byte | The value of the specified column. |
GetBytes(Int32, Int64, Byte[], Int32, Int32)
Reads a specified number of bytes from the specified column starting at a specified index and writes them to a buffer starting at a specified position in the buffer.
Declaration
public override long GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
| System.Int64 | dataOffset | The index within the row from which to begin the read operation. |
| System.Byte[] | buffer | The buffer into which to copy the data. |
| System.Int32 | bufferOffset | The index with the buffer to which the data will be copied. |
| System.Int32 | length | The maximum number of characters to read. |
Returns
| Type | Description |
|---|---|
| System.Int64 | The actual number of bytes read. |
GetChar(Int32)
Gets the value of the specified column as a char.
Declaration
public override char GetChar(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Char | The value of the specified column. |
GetChars(Int32, Int64, Char[], Int32, Int32)
Reads a specified number of characters from a specified column starting at a specified index, and writes them to a buffer starting at a specified position.
Declaration
public override long GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
| System.Int64 | dataOffset | The index within the row from which to begin the read operation. |
| System.Char[] | buffer | The buffer into which to copy the data. |
| System.Int32 | bufferOffset | The index with the buffer to which the data will be copied. |
| System.Int32 | length | The maximum number of characters to read. |
Returns
| Type | Description |
|---|---|
| System.Int64 | The actual number of characters read. |
GetDataTypeName(Int32)
Gets name of the data type of the specified column.
Declaration
public override string GetDataTypeName(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.String | The name of the data type. |
GetDateTime(Int32)
Gets the value of the specified column as a DateTime.
Declaration
public override DateTime GetDateTime(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| DateTime | The value of the specified column. |
GetDecimal(Int32)
Gets the value of the specified column as a decimal.
Declaration
public override decimal GetDecimal(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Decimal | The value of the specified column. |
GetDouble(Int32)
Gets the value of the specified column as a double.
Declaration
public override double GetDouble(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Double | The value of the specified column. |
GetEnumerator()
Returns an enumerator that can be used to iterate through the rows in the data reader.
Declaration
public override IEnumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator | An enumerator that can be used to iterate through the rows in the data reader. |
GetFieldType(Int32)
Gets the data type of the specified column.
Declaration
public override Type GetFieldType(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| Type | The data type of the specified column. |
GetFloat(Int32)
Gets the value of the specified column as a float.
Declaration
public override float GetFloat(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Single | The value of the specified column. |
GetGuid(Int32)
Gets the value of the specified column as a Guid.
Declaration
public override Guid GetGuid(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| Guid | The value of the specified column. |
GetInt16(Int32)
Gets the value of the specified column as a 16-bit signed integer.
Declaration
public override short GetInt16(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Int16 | The value of the specified column. |
GetInt32(Int32)
Gets the value of the specified column as a 32-bit signed integer.
Declaration
public override int GetInt32(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The value of the specified column. |
GetInt64(Int32)
Gets the value of the specified column as a 64-bit signed integer.
Declaration
public override long GetInt64(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Int64 | The value of the specified column. |
GetName(Int32)
Gets the name of the column, given the zero-based column ordinal.
Declaration
public override string GetName(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.String | The name of the specified column. |
GetOrdinal(String)
Gets the column ordinal given the name of the column.
Declaration
public override int GetOrdinal(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the column. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The zero-based column ordinal. |
GetString(Int32)
Gets the value of the specified column as a string.
Declaration
public override string GetString(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.String | The value of the specified column. |
GetValue(Int32)
Gets the value of the specified column as an instance of
Declaration
public override object GetValue(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Object | The value of the specified column. |
GetValues(Object[])
Populates an array of objects with the column values of the current row.
Declaration
public override int GetValues(object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | values | An array of |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of instances of |
IsDBNull(Int32)
Gets a value that indicates whether the column contains nonexistent or missing values.
Declaration
public override bool IsDBNull(int ordinal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | ordinal | The zero-based column ordinal. |
Returns
| Type | Description |
|---|---|
| System.Boolean | if the specified column is equivalent to .
|
NextResult()
Advances the reader to the next result when reading the results of a batch of statements.
Declaration
public override bool NextResult()
Returns
| Type | Description |
|---|---|
| System.Boolean | if there are more result sets; otherwise, .
|
Read()
Advances the reader to the next record in a result set.
Declaration
public override bool Read()
Returns
| Type | Description |
|---|---|
| System.Boolean | if there are more rows; otherwise, .
|