diff options
author | randomdan <randomdan@localhost> | 2010-08-05 23:48:05 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-08-05 23:48:05 +0000 |
commit | fd27b85b004ad13c4139d84a287fd3f3ef444c4b (patch) | |
tree | cd089ac1c4f2c93a2ee2911db07f49aa096a83f8 /libodbcpp/selectcommand.cpp | |
parent | Fix behaviour of composing a string column (diff) | |
download | libdbpp-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.cpp | 4 |
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; |