This commit is contained in:
2024-10-09 19:50:05 -05:00
parent 67053645e1
commit 55bcf082ec
3 changed files with 4 additions and 4 deletions

View File

@ -39,6 +39,7 @@ using db3_t = std::unique_ptr<sqlite3, sqlite3_deleter>;
struct sqlite3_statement_deleter {
void operator()(sqlite3_stmt *stmt) const {
if (stmt != nullptr) {
std::cout << "freeing stmt" << std::endl;
sqlite3_reset(stmt);
sqlite3_finalize(stmt);
}
@ -61,12 +62,10 @@ struct db_context_t {
db_context_t(sqlite3 &db3_, std::string table_name_)
: db3(db3_), table_name(std::move(table_name_)) {}
virtual ~db_context_t() = default;
sqlite3 &db3;
std::string table_name;
db3_stmt_t stmt{nullptr};
db3_stmt_t stmt;
};
class db_column final {