feature/knowledge_base #3

Merged
cromer merged 9 commits from feature/knowledge_base into develop 2022-11-09 16:52:23 -03:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit e9a72ea203 - Show all commits

View File

@ -41,7 +41,10 @@ obelisk::KnowledgeBase::KnowledgeBase(const char* filename, int flags)
obelisk::KnowledgeBase::~KnowledgeBase()
{
sqlite3_close_v2(dbConnection_);
if (dbConnection_)
{
sqlite3_close_v2(dbConnection_);
}
}
void obelisk::KnowledgeBase::createTable(std::function<const char*()> function)

View File

@ -15,7 +15,7 @@ namespace obelisk
const int DEFAULT_FLAGS
= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
const char* filename_;
sqlite3* dbConnection_;
sqlite3* dbConnection_ = nullptr;
int flags_;
void logSqliteError(int result);