summaryrefslogtreecommitdiff
path: root/libsqlitepp/selectcommand.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-09-22 23:24:35 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-09-22 23:24:35 +0100
commit2f06b35c07e91d38eb362796f7ea73964c0c000c (patch)
tree9618014a37e86c6d4c3c5945add45051e69415ee /libsqlitepp/selectcommand.cpp
parentAdd a code coverage profile (diff)
downloadlibdbpp-sqlite-2f06b35c07e91d38eb362796f7ea73964c0c000c.tar.bz2
libdbpp-sqlite-2f06b35c07e91d38eb362796f7ea73964c0c000c.tar.xz
libdbpp-sqlite-2f06b35c07e91d38eb362796f7ea73964c0c000c.zip
Connector compatibility fix
Diffstat (limited to 'libsqlitepp/selectcommand.cpp')
-rw-r--r--libsqlitepp/selectcommand.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libsqlitepp/selectcommand.cpp b/libsqlitepp/selectcommand.cpp
index 8b0e8f9..a79b031 100644
--- a/libsqlitepp/selectcommand.cpp
+++ b/libsqlitepp/selectcommand.cpp
@@ -2,6 +2,8 @@
#include "connection.h"
#include "error.h"
#include <string.h>
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
namespace SQLite {
class Column : public DB::Column {
@@ -37,7 +39,6 @@ namespace SQLite {
case SQLITE_BLOB:
throw std::runtime_error("Blobs not supported");
}
-
}
void rebind(DB::Command*, unsigned int) const {
@@ -67,9 +68,9 @@ SQLite::SelectCommand::fetch()
{
switch (sqlite3_step(stmt)) {
case SQLITE_ROW:
- if (columns.empty()) {
+ if (columns->empty()) {
for (int c = sqlite3_data_count(stmt) - 1; c >= 0; c -= 1) {
- columns.insert(DB::ColumnPtr(new Column(sqlite3_column_name(stmt, c), c, stmt)));
+ insertColumn(DB::ColumnPtr(new Column(sqlite3_column_name(stmt, c), c, stmt)));
}
}
return true;