mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
- SQL logging channel and archiving strategy
- row formatting refactored - affected row count for insert, delete and update returned from Statement::execute() - internal SQL string formatting capability using Poco::format()
This commit is contained in:
@@ -64,9 +64,9 @@ RecordSet::RecordSet(Session& rSession,
|
||||
Statement((rSession << query, now)),
|
||||
_currentRow(0),
|
||||
_pBegin(new RowIterator(this)),
|
||||
_pEnd(new RowIterator(this, true)),
|
||||
_pRowFormatter(pRowFormatter)
|
||||
_pEnd(new RowIterator(this, true))
|
||||
{
|
||||
if (pRowFormatter) setRowFormatter(pRowFormatter);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,7 @@ RecordSet::RecordSet(const RecordSet& other):
|
||||
Statement(other.impl().duplicate()),
|
||||
_currentRow(other._currentRow),
|
||||
_pBegin(new RowIterator(this)),
|
||||
_pEnd(new RowIterator(this, true)),
|
||||
_pRowFormatter(other._pRowFormatter)
|
||||
_pEnd(new RowIterator(this, true))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -155,14 +154,14 @@ Row& RecordSet::row(std::size_t pos)
|
||||
{
|
||||
if (_rowMap.size())//reuse first row column names to save some memory
|
||||
{
|
||||
pRow = new Row(_rowMap.begin()->second->names(), &_pRowFormatter);
|
||||
pRow = new Row(_rowMap.begin()->second->names(), getRowFormatter());
|
||||
for (std::size_t col = 0; col < columns; ++col)
|
||||
pRow->set(col, value(col, pos));
|
||||
}
|
||||
else
|
||||
{
|
||||
pRow = new Row;
|
||||
if (_pRowFormatter) pRow->setFormatter(&_pRowFormatter);
|
||||
pRow->setFormatter(getRowFormatter());
|
||||
for (std::size_t col = 0; col < columns; ++col)
|
||||
pRow->append(metaColumn(static_cast<UInt32>(col)).name(), value(col, pos));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user