mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 04:17:55 +01:00
another fix for #1203: need to reset _rowMap as well. Also, don't hide reset() from base class
This commit is contained in:
@@ -315,6 +315,9 @@ public:
|
|||||||
/// Returns true if there is at least one row in the RecordSet,
|
/// Returns true if there is at least one row in the RecordSet,
|
||||||
/// false otherwise.
|
/// false otherwise.
|
||||||
|
|
||||||
|
using Statement::reset;
|
||||||
|
/// Don't hide base class method.
|
||||||
|
|
||||||
void reset(const Statement& stmt);
|
void reset(const Statement& stmt);
|
||||||
/// Resets the RecordSet and assigns a new statement.
|
/// Resets the RecordSet and assigns a new statement.
|
||||||
/// Should be called after the given statement has been reset,
|
/// Should be called after the given statement has been reset,
|
||||||
@@ -471,7 +474,6 @@ private:
|
|||||||
void filter(RowFilter* pFilter);
|
void filter(RowFilter* pFilter);
|
||||||
/// Sets the filter for the RecordSet.
|
/// Sets the filter for the RecordSet.
|
||||||
|
|
||||||
|
|
||||||
const RowFilter* getFilter() const;
|
const RowFilter* getFilter() const;
|
||||||
/// Returns the filter associated with the RecordSet.
|
/// Returns the filter associated with the RecordSet.
|
||||||
|
|
||||||
@@ -491,6 +493,7 @@ private:
|
|||||||
/// inlines
|
/// inlines
|
||||||
///
|
///
|
||||||
|
|
||||||
|
|
||||||
inline Data_API std::ostream& operator << (std::ostream &os, const RecordSet& rs)
|
inline Data_API std::ostream& operator << (std::ostream &os, const RecordSet& rs)
|
||||||
{
|
{
|
||||||
return rs.copy(os);
|
return rs.copy(os);
|
||||||
|
|||||||
@@ -102,6 +102,11 @@ void RecordSet::reset(const Statement& stmt)
|
|||||||
_currentRow = 0;
|
_currentRow = 0;
|
||||||
_totalRowCount = UNKNOWN_TOTAL_ROW_COUNT;
|
_totalRowCount = UNKNOWN_TOTAL_ROW_COUNT;
|
||||||
|
|
||||||
|
RowMap::iterator it = _rowMap.begin();
|
||||||
|
RowMap::iterator end = _rowMap.end();
|
||||||
|
for (; it != end; ++it) delete it->second;
|
||||||
|
_rowMap.clear();
|
||||||
|
|
||||||
Statement::operator = (stmt);
|
Statement::operator = (stmt);
|
||||||
|
|
||||||
_pBegin = new RowIterator(this, 0 == rowsExtracted());
|
_pBegin = new RowIterator(this, 0 == rowsExtracted());
|
||||||
|
|||||||
Reference in New Issue
Block a user