Interface IDatabaseReader
Provides an ierface to read a forward-only stream of rows from a data source.
Namespace: Paradigm.ORM.Data.Database
Assembly: Paradigm.ORM.Data.dll
Syntax
public interface IDatabaseReader : IDisposable
Methods
| Improve this Doc View SourceGetBoolean(Int32)
Gets the value of the specified column as a
Declaration
bool GetBoolean(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Declaration
byte GetByte(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.Byte | The value of the specified column. |
GetBytes(Int32)
Reads a stream of bytes from the specified column.
Declaration
byte[] GetBytes(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.Byte[] |
GetDateTime(Int32)
Gets the value of the specified column as a
Declaration
DateTime GetDateTime(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Declaration
decimal GetDecimal(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Declaration
double GetDouble(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.Double | The value of the specified column. |
GetFieldValue<T>(Int32)
Gets the value of the specified column as a type.
Declaration
T GetFieldValue<T>(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The column to be retrieved. |
Returns
Type | Description |
---|---|
T | The returned type object. |
Type Parameters
Name | Description |
---|---|
T | The type of the value to be returned. See the remarks section for more information. |
GetFieldValueAsync<T>(Int32)
Gets the value of the specified column as a type.
Declaration
Task<T> GetFieldValueAsync<T>(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The column to be retrieved. |
Returns
Type | Description |
---|---|
Task<T> | The returned type object. |
Type Parameters
Name | Description |
---|---|
T | The type of the value to be returned. See the remarks section for more information. |
GetFloat(Int32)
Gets the value of the specified column as a
Declaration
float GetFloat(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Declaration
Guid GetGuid(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Declaration
short GetInt16(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Declaration
int GetInt32(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Declaration
long GetInt64(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.Int64 | The value of the specified column. |
GetName(Int32)
Gets the name of the specified column.
Declaration
string GetName(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
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. |
GetSByte(Int32)
Gets the value of the specified column as a
Declaration
sbyte GetSByte(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.SByte | The value of the specified column. |
GetString(Int32)
Gets the value of the specified column as a
Declaration
string GetString(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.String | The value of the specified column. |
GetTimeSpan(Int32)
Gets the value of the specified column as a
Declaration
TimeSpan GetTimeSpan(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
TimeSpan | The value of the specified column. |
GetUInt16(Int32)
Gets the value of the specified column as a
Declaration
ushort GetUInt16(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.UInt16 | The value of the specified column. |
GetUInt32(Int32)
Gets the value of the specified column as a
Declaration
uint GetUInt32(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.UInt32 | The value of the specified column. |
GetUInt64(Int32)
Gets the value of the specified column as a
Declaration
ulong GetUInt64(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.UInt64 | The value of the specified column. |
GetValue(Int32)
Gets the value of the specified column as an instance of
Declaration
object GetValue(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.Object | The value of the specified column. |
GetValue(String)
Gets the value of the specified column as an instance of
Declaration
object GetValue(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the column. |
Returns
Type | Description |
---|---|
System.Object | The value of the specified column. |
IsDBNull(Int32)
Gets a value that indicates whether the column contains nonexistent or missing values.
Declaration
bool IsDBNull(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified column is equivalent to System.DBNull; otherwise false. |
IsDBNullAsync(Int32)
Gets a value that indicates whether the column contains nonexistent or missing values.
Declaration
Task<bool> IsDBNullAsync(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based column ordinal. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | true if the specified column is equivalent to System.DBNull; otherwise false. |
NextResult()
Advances the data reader to the next result, when reading the results of batch SQL statements.
Declaration
bool NextResult()
Returns
Type | Description |
---|---|
System.Boolean | true if there are more result sets; otherwise false. |
NextResultAsync()
Advances the data reader to the next result, when reading the results of batch SQL statements.
Declaration
Task<bool> NextResultAsync()
Returns
Type | Description |
---|---|
Task<System.Boolean> | true if there are more result sets; otherwise false. |
Read()
Advances the DatabaseReader to the next record.
Declaration
bool Read()
Returns
Type | Description |
---|---|
System.Boolean | true if there are more rows; otherwise false. |
ReadAsync()
Advances the DatabaseReader to the next record.
Declaration
Task<bool> ReadAsync()
Returns
Type | Description |
---|---|
Task<System.Boolean> | true if there are more rows; otherwise false. |