Fetch first |
The new_CurRowsetStart always moves to
first_row, regardless of the position of
CurRowsetStart and the value of
fetchSize.
|
Fetch last |
-
If total_rows >= fetchSize, then
new_CurRowsetStart = total_rows –
fetchSize + 1.
-
If total_rows < fetchSize, then
new_CurRowsetStart is on
first_row.
|
Fetch next |
-
If CurRowsetStart is before_first,
then new_CurRowsetStart is on
first_row.
-
Let curPos = ( CurRowsetStart +
fetchSize), -
curPos <=total_rows, then
new_CurRowsetStart =
curPos
-
curPos > total_rows,
new_CurRowsetStart is
after_last
-
If CurRowsetStart is after_last row,
then new_CurRowsetStart remains on
after_last.
|
Fetch prior |
-
new_CurRowsetStart is before_first
when one of these conditions is true:
-
Let curPos = CurRowsetStart –
fetchSize; iff 1 <=curPos
<=total_rows, then
new_CurRowsetStart = curPos.
-
If (CurRowsetStart is after_last),
let curPos = total_rows –
fetchSize + 1 new_CurRowsetStart =
curPos if curPos > 0
new_CurRowsetStart is before_first
if curPos <= 0
|
Fetch relative |
-
If (CurRowsetStart is before_first)
&& (fetch_offset > 0), then
new_CurRowsetStart =
fetch_offset.
-
new_CurRowsetStart is before_first if
one of these conditions is true: -
(CurRowsetStart is
before_first) and
(fetch_offset < 0)
-
(CurRowsetStart is on
first_row) and (fetch_offset
< 0)
-
(CurRowsetStart is after_last)
and ((CurRowsetStart +
fetch_offset + 1) <= 0)
-
If (1 < CurRowsetStart <=
total_rows), let curPos =
CurRowsetStart + fetch_offset, then: -
new_CurRowsetStart is on
first_row iff
(curPos < 1) and abs
(fetch_offset) <=
fetchSize
-
new_CurRowsetStart is before
first_row iff
(curPos < 1) &&
(abs
(fetch_offset)
fetchSize)
-
new_CurRowsetStart = curPos iff
(0 < curPos
<=total_rows)
-
new_CurRowsetStart is
after_last iff curPos >
total_rows
-
If (CurRowsetStart is after_last),
let curPos = CurRowsetStart +
fetch_offset +1, then:
-
new_CurRowsetStart = curPos iff
1 <= curPos <=
total_rows
-
new_CurRowsetStart is
before_first iff curPos <=
0
-
new_CurRowsetStart is
after_last iff curPos >
total_rows
|
Fetch absolute |
-
If fetch_offset = 0,
new_CurRowsetStart is
before_first
-
If fetch_offset > total_rows,
new_CurRowsetStart is after_last
-
If 0 < fetch_offset <=
total_rows, new_CurRowsetStart =
fetch_offset
-
If (fetch_offset < 0) &&
(abs
(fetch_offset) >
total_rows), let
abs_offset = abs
(fetch_offset)
new_CurRowsetStart is
before_first iff abs_offset >
fetchSize
new_CurRowsetStart is on
first_row iff abs_offset <=
fetchSize
-
If (fetch_offset < 0) &&
(abs
(fetch_offset) <=
total_rows)
new_CurRowsetStart =
total_rows + fetch_offset + 1
|