diff options
-rw-r--r-- | libsqlitepp/sqlite-selectcommand.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsqlitepp/sqlite-selectcommand.cpp b/libsqlitepp/sqlite-selectcommand.cpp index a65cbd1..67e90ba 100644 --- a/libsqlitepp/sqlite-selectcommand.cpp +++ b/libsqlitepp/sqlite-selectcommand.cpp @@ -64,7 +64,7 @@ SQLite::SelectCommand::fetch() { switch (sqlite3_step(stmt)) { case SQLITE_ROW: - if (columns->empty()) { + if (!columnCount()) { for (int c = sqlite3_data_count(stmt) - 1; c >= 0; c -= 1) { insertColumn(std::make_shared<Column>(sqlite3_column_name(stmt, c), c, stmt)); } |