improved support for multiple statement execution and recordset paging

This commit is contained in:
Aleksandar Fabijanic
2009-08-11 14:34:21 +00:00
parent c6ee567a71
commit 49101951a2
12 changed files with 267 additions and 61 deletions

View File

@@ -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.");