diff options
Diffstat (limited to 'frontend/DB.cpp')
-rw-r--r-- | frontend/DB.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/DB.cpp b/frontend/DB.cpp index f40a9fd..28a1c3d 100644 --- a/frontend/DB.cpp +++ b/frontend/DB.cpp @@ -77,24 +77,24 @@ DBQueryRow DBStatement::row() { DBQueryRow::DBQueryRow(DBStatement & parent) : parent(parent) { } template <> -const char * DBQueryRow::col<const char*>(int index, const char * const & default_value) { +const char * DBQueryRow::col<const char*>(int index, const char * const & default_value) const { int type = sqlite3_column_type(this->parent.stmt.get(), index); if (type == SQLITE_NULL) return default_value; return reinterpret_cast<const char *>(sqlite3_column_text(this->parent.stmt.get(), index)); } template <> -const char * DBQueryRow::col<const char*>(int index) { +const char * DBQueryRow::col<const char*>(int index) const { return this->col<const char *>(index, ""); } template <> -int DBQueryRow::col<int>(int index, const int & default_value) { +int DBQueryRow::col<int>(int index, const int & default_value) const { int type = sqlite3_column_type(this->parent.stmt.get(), index); if (type == SQLITE_NULL) return default_value; return sqlite3_column_int(this->parent.stmt.get(), index); } template <> -int DBQueryRow::col<int>(int index) { +int DBQueryRow::col<int>(int index) const { return this->col<int>(index, 0); } |