Dockcross!
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include <chrono> // For seeding random number generator
|
||||
#include <vector> // For getAllKeys
|
||||
#include <string_view> // For litecask values
|
||||
#include <sqlite3.h> // Include SQLite
|
||||
#include <stdexcept> // For std::runtime_error
|
||||
|
||||
|
||||
@@ -39,17 +38,6 @@ private:
|
||||
bool released_;
|
||||
};
|
||||
|
||||
// Helper to execute SQL and check for errors
|
||||
void execute_sql(sqlite3* db, const char* sql, const std::string& error_msg_prefix) {
|
||||
char* err_msg = nullptr;
|
||||
int rc = sqlite3_exec(db, sql, 0, 0, &err_msg);
|
||||
if (rc != SQLITE_OK) {
|
||||
std::string error_details = error_msg_prefix + ": " + (err_msg ? err_msg : "Unknown error");
|
||||
sqlite3_free(err_msg);
|
||||
throw std::runtime_error(error_details);
|
||||
}
|
||||
}
|
||||
|
||||
bool Server::init_db() {
|
||||
try {
|
||||
std::filesystem::path db_path = config_.object_store_path / "index.db";
|
||||
|
Reference in New Issue
Block a user