Class LimitOffsetDataReader
Data reader over some other System.Data.IDataReader. It can iterate just specified number of rows (Limit)
and skip some rows at the begining (Offset).
Inheritance
System.Object
LimitOffsetDataReader
Assembly: Kros.KORM.dll
Syntax
public class LimitOffsetDataReader : IDataReaderEnvelope, IDataReader, IDisposable, IDataRecord
Constructors
LimitOffsetDataReader(Int32)
Creates an instance wit specified limit
. Offset is set to 0.
Declaration
public LimitOffsetDataReader(int limit)
Parameters
Type |
Name |
Description |
System.Int32 |
limit |
Maximum number of rows returned. If value is 0, number of rows not limited.
|
LimitOffsetDataReader(Int32, Int32)
Creates an instance wit specified limit
and offset
.
Declaration
public LimitOffsetDataReader(int limit, int offset)
Parameters
Type |
Name |
Description |
System.Int32 |
limit |
Maximum number of rows returned. If value is 0, number of rows not limited.
|
System.Int32 |
offset |
Number of rows to skip from the begining.
|
Properties
Depth
Declaration
public int Depth { get; }
Property Value
Type |
Description |
System.Int32 |
|
FieldCount
Declaration
public int FieldCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
IsClosed
Declaration
public bool IsClosed { get; }
Property Value
Type |
Description |
System.Boolean |
|
Item[Int32]
Declaration
public object this[int i] { get; }
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Property Value
Type |
Description |
System.Object |
|
Item[String]
Declaration
public object this[string name] { get; }
Parameters
Type |
Name |
Description |
System.String |
name |
|
Property Value
Type |
Description |
System.Object |
|
Limit
Maximum number of rows returned. If value is 0, number of rows not limited.
Declaration
public int Limit { get; }
Property Value
Type |
Description |
System.Int32 |
|
Offset
Number of rows to skip from the begining.
Declaration
public int Offset { get; }
Property Value
Type |
Description |
System.Int32 |
|
RecordsAffected
Declaration
public int RecordsAffected { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
Close()
Declaration
Dispose()
Declaration
GetBoolean(Int32)
Declaration
public bool GetBoolean(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Boolean |
|
GetByte(Int32)
Declaration
public byte GetByte(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Byte |
|
GetBytes(Int32, Int64, Byte[], Int32, Int32)
Declaration
public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
System.Int64 |
fieldOffset |
|
System.Byte[] |
buffer |
|
System.Int32 |
bufferoffset |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Int64 |
|
GetData(Int32)
Declaration
public IDataReader GetData(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Data.IDataReader |
|
GetDataTypeName(Int32)
Declaration
public string GetDataTypeName(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.String |
|
GetDateTime(Int32)
Declaration
public DateTime GetDateTime(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.DateTime |
|
GetDecimal(Int32)
Declaration
public decimal GetDecimal(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Decimal |
|
GetDouble(Int32)
Declaration
public double GetDouble(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Double |
|
GetFieldType(Int32)
Declaration
public Type GetFieldType(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Type |
|
GetFloat(Int32)
Declaration
public float GetFloat(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Single |
|
GetGuid(Int32)
Declaration
public Guid GetGuid(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Guid |
|
GetChar(Int32)
Declaration
public char GetChar(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Char |
|
GetChars(Int32, Int64, Char[], Int32, Int32)
Declaration
public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
System.Int64 |
fieldoffset |
|
System.Char[] |
buffer |
|
System.Int32 |
bufferoffset |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Int64 |
|
GetInt16(Int32)
Declaration
public short GetInt16(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Int16 |
|
GetInt32(Int32)
Declaration
public int GetInt32(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Int32 |
|
GetInt64(Int32)
Declaration
public long GetInt64(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Int64 |
|
GetName(Int32)
Declaration
public string GetName(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.String |
|
GetOrdinal(String)
Declaration
public int GetOrdinal(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Int32 |
|
GetSchemaTable()
Declaration
public DataTable GetSchemaTable()
Returns
Type |
Description |
System.Data.DataTable |
|
GetString(Int32)
Declaration
public string GetString(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.String |
|
GetValue(Int32)
Declaration
public object GetValue(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Object |
|
GetValues(Object[])
Declaration
public int GetValues(object[] values)
Parameters
Type |
Name |
Description |
System.Object[] |
values |
|
Returns
Type |
Description |
System.Int32 |
|
IsDBNull(Int32)
Declaration
public bool IsDBNull(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Type |
Description |
System.Boolean |
|
NextResult()
Declaration
Returns
Type |
Description |
System.Boolean |
|
Read()
Declaration
Returns
Type |
Description |
System.Boolean |
|
SetInnerReader(IDataReader)
Sets the inner reader, to which Limit and Offset are applied.
Inner reader is closed when this reader is closed.
Declaration
public void SetInnerReader(IDataReader innerReader)
Parameters
Type |
Name |
Description |
System.Data.IDataReader |
innerReader |
Inner reader.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Value of innerReader is null.
|
System.InvalidOperationException |
Inner reader is already set.
|
Implements