diff --git a/src/core/db/Connection.cpp b/src/core/db/Connection.cpp index 27b092cd2..206de36fa 100644 --- a/src/core/db/Connection.cpp +++ b/src/core/db/Connection.cpp @@ -53,26 +53,6 @@ Connection::~Connection() { this->UpdateReferenceCount(false); } -int Connection::Open(const char *database, unsigned int options, unsigned int cache) { - if (!this->connection) { - int error; - -#ifdef UTF_WIDECHAR - error = sqlite3_open16(database, &this->connection); -#else - error = sqlite3_open(database, &this->connection); -#endif - - if (error == SQLITE_OK) { - this->Initialize(cache); - } - - return error; - } - - return SQLITE_OK; -} - int Connection::Open(const std::string &database, unsigned int options, unsigned int cache) { int error; @@ -124,32 +104,6 @@ int Connection::Execute(const char* sql) { return Okay; } -int Connection::Execute(const wchar_t* sql) { - sqlite3_stmt *stmt = nullptr; - - { - std::unique_lock lock(this->mutex); - - int err = sqlite3_prepare16_v2(this->connection, sql, -1, &stmt, nullptr); - - if (err != SQLITE_OK) { - sqlite3_finalize(stmt); - return Error; - } - } - - int error = this->StepStatement(stmt); - - if (error != SQLITE_OK && error != SQLITE_DONE) { - sqlite3_finalize(stmt); - return Error; - } - - sqlite3_reset(stmt); - sqlite3_finalize(stmt); - return Okay; -} - void Connection::Checkpoint() { sqlite3_wal_checkpoint(this->connection, nullptr); } diff --git a/src/core/db/Connection.h b/src/core/db/Connection.h index f4141b4b3..d3c4cc6fc 100644 --- a/src/core/db/Connection.h +++ b/src/core/db/Connection.h @@ -60,11 +60,9 @@ namespace musik { namespace core { namespace db { Connection(); ~Connection(); - int Open(const char *database, unsigned int options = 0, unsigned int cache = 0); int Open(const std::string &database, unsigned int options = 0, unsigned int cache = 0); int Close(); int Execute(const char* sql); - int Execute(const wchar_t* sql); int64_t LastInsertedId();