mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
improved support for multiple statement execution and recordset paging
This commit is contained in:
@@ -89,7 +89,7 @@ void RowIterator::increment() const
|
||||
if (POSITION_END == _position)
|
||||
throw RangeException("End of iterator reached.");
|
||||
|
||||
if (_position < _pRecordSet->totalRowCount() - 1)
|
||||
if (_position < _pRecordSet->subTotalRowCount() - 1)
|
||||
++_position;
|
||||
else
|
||||
_position = POSITION_END;
|
||||
@@ -110,7 +110,7 @@ void RowIterator::decrement() const
|
||||
if (0 == _position)
|
||||
throw RangeException("Beginning of iterator reached.");
|
||||
else if (POSITION_END == _position)
|
||||
_position = _pRecordSet->totalRowCount() - 1;
|
||||
_position = _pRecordSet->subTotalRowCount() - 1;
|
||||
else
|
||||
--_position;
|
||||
|
||||
@@ -146,16 +146,15 @@ void RowIterator::setPosition(std::size_t pos) const
|
||||
std::size_t end = pos - _position;
|
||||
for (; start < end; ++start)
|
||||
{
|
||||
if (_pRecordSet->totalRowCount() != pos) ++pos;
|
||||
if (_pRecordSet->subTotalRowCount() != pos) ++pos;
|
||||
else throw RangeException("Invalid position argument.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (pos < _pRecordSet->totalRowCount())
|
||||
if (pos < _pRecordSet->subTotalRowCount())
|
||||
_position = pos;
|
||||
else if (pos == _pRecordSet->totalRowCount())
|
||||
else if (pos == _pRecordSet->subTotalRowCount())
|
||||
_position = POSITION_END;
|
||||
else
|
||||
throw RangeException("Invalid position argument.");
|
||||
|
||||
Reference in New Issue
Block a user