make RecordSet::reset(stmt) return a reference to itself

This commit is contained in:
Bernhard Rieder 2017-07-12 11:10:17 +02:00
parent bc27086003
commit 115edb9605
2 changed files with 4 additions and 2 deletions

View File

@ -323,7 +323,7 @@ public:
using Statement::reset;
/// Don't hide base class method.
void reset(const Statement& stmt);
RecordSet& reset(const Statement& stmt);
/// Resets the RecordSet and assigns a new statement.
/// Should be called after the given statement has been reset,
/// assigned a new SQL statement, and executed.

View File

@ -89,7 +89,7 @@ RecordSet::~RecordSet()
}
void RecordSet::reset(const Statement& stmt)
RecordSet& RecordSet::reset(const Statement& stmt)
{
delete _pBegin;
_pBegin = 0;
@ -107,6 +107,8 @@ void RecordSet::reset(const Statement& stmt)
_pBegin = new RowIterator(this, 0 == rowsExtracted());
_pEnd = new RowIterator(this, true);
return *this;
}