feature/knowledge_base #3
@ -41,7 +41,10 @@ obelisk::KnowledgeBase::KnowledgeBase(const char* filename, int flags)
|
|||||||
|
|
||||||
obelisk::KnowledgeBase::~KnowledgeBase()
|
obelisk::KnowledgeBase::~KnowledgeBase()
|
||||||
{
|
{
|
||||||
sqlite3_close_v2(dbConnection_);
|
if (dbConnection_)
|
||||||
|
{
|
||||||
|
sqlite3_close_v2(dbConnection_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void obelisk::KnowledgeBase::createTable(std::function<const char*()> function)
|
void obelisk::KnowledgeBase::createTable(std::function<const char*()> function)
|
||||||
|
@ -15,7 +15,7 @@ namespace obelisk
|
|||||||
const int DEFAULT_FLAGS
|
const int DEFAULT_FLAGS
|
||||||
= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
|
= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
|
||||||
const char* filename_;
|
const char* filename_;
|
||||||
sqlite3* dbConnection_;
|
sqlite3* dbConnection_ = nullptr;
|
||||||
int flags_;
|
int flags_;
|
||||||
void logSqliteError(int result);
|
void logSqliteError(int result);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user