DarkflameServer/dDatabase/CDClientDatabase.cpp

21 lines
582 B
C++
Raw Normal View History

#include "CDClientDatabase.h"
#include "CDComponentsRegistryTable.h"
// Static Variables
2022-07-28 13:39:57 +00:00
static CppSQLite3DB* conn = new CppSQLite3DB();
//! Opens a connection with the CDClient
void CDClientDatabase::Connect(const std::string& filename) {
2022-07-28 13:39:57 +00:00
conn->open(filename.c_str());
}
//! Queries the CDClient
CppSQLite3Query CDClientDatabase::ExecuteQuery(const std::string& query) {
2022-07-28 13:39:57 +00:00
return conn->execQuery(query.c_str());
}
//! Makes prepared statements
CppSQLite3Statement CDClientDatabase::CreatePreppedStmt(const std::string& query) {
2022-07-28 13:39:57 +00:00
return conn->compileStatement(query.c_str());
}