From 2f06b35c07e91d38eb362796f7ea73964c0c000c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 22 Sep 2015 23:24:35 +0100 Subject: Connector compatibility fix --- libsqlitepp/selectcommand.cpp | 7 ++++--- 1 file 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 +#include +#include 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; -- cgit v1.2.3