- 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:
Aleksandar Fabijanic
2008-01-12 18:25:27 +00:00
parent b57f579d16
commit 9e8e627347
63 changed files with 2556 additions and 337 deletions

View File

@@ -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));
}