summaryrefslogtreecommitdiff
path: root/libodbcpp/selectcommand.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-08-05 23:48:05 +0000
committerrandomdan <randomdan@localhost>2010-08-05 23:48:05 +0000
commitfd27b85b004ad13c4139d84a287fd3f3ef444c4b (patch)
treecd089ac1c4f2c93a2ee2911db07f49aa096a83f8 /libodbcpp/selectcommand.cpp
parentFix behaviour of composing a string column (diff)
downloadlibdbpp-odbc-fd27b85b004ad13c4139d84a287fd3f3ef444c4b.tar.bz2
libdbpp-odbc-fd27b85b004ad13c4139d84a287fd3f3ef444c4b.tar.xz
libdbpp-odbc-fd27b85b004ad13c4139d84a287fd3f3ef444c4b.zip
Cache the result of default column compose
Use this cache now lots of things are const refs
Diffstat (limited to 'libodbcpp/selectcommand.cpp')
-rw-r--r--libodbcpp/selectcommand.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libodbcpp/selectcommand.cpp b/libodbcpp/selectcommand.cpp
index a1a5531..97102ab 100644
--- a/libodbcpp/selectcommand.cpp
+++ b/libodbcpp/selectcommand.cpp
@@ -34,6 +34,10 @@ ODBC::SelectCommand::fetch()
RETCODE rc = SQLFetch(hStmt);
switch (rc) {
case SQL_SUCCESS:
+ for (Columns::iterator i = columns.begin(); i != columns.end(); i++) {
+ delete (*i)->composeCache;
+ (*i)->composeCache = NULL;
+ }
return true;
case SQL_NO_DATA:
return false;