22 namespace Deveel.Data.Sql.Cursors {
26 throw new ArgumentNullException(
"cursor");
41 internal ITable Result {
get;
private set; }
43 private int CurrentOffset {
get; set; }
59 rowOffset = CurrentOffset + 1;
61 rowOffset = CurrentOffset - 1;
63 rowOffset = CurrentOffset = 0;
69 rowOffset = CurrentOffset + offset;
72 throw new InvalidOperationException();
75 if (rowOffset < 0 || rowOffset >= table.
RowCount)
76 throw new IndexOutOfRangeException(
77 String.Format(
"The fetch offset '{0}' is smaller than zero or greater than the result set ({1}).", rowOffset,
80 CurrentOffset = rowOffset;
83 return table.GetRow(rowOffset);
88 GC.SuppressFinalize(
this);
Defines the contract to access the data contained into a table of a database.
void Dispose(bool disposing)
CursorState(Cursor cursor)
A single row in a table of a database.
void Open(ITable result, SqlExpression[] args)
int RowCount
Gets the total number of rows in the table.
Row FetchRowFrom(ITable table, FetchDirection direction, int offset)
Defines the base class for instances that represent SQL expression tree nodes.