Bug fixing

This commit is contained in:
Your Name
2025-05-25 12:51:07 +12:00
parent 37db886a01
commit 0c23bac739
3 changed files with 187 additions and 60 deletions

View File

@@ -19,7 +19,7 @@ class dbEntry {
class Database {
public:
static const int CURRENT_VERSION = 2;
static const int CURRENT_VERSION = 3;
Database(const std::filesystem::path& path);
~Database();
@@ -37,6 +37,11 @@ class Database {
bool setVersion(int version);
bool migrate(int from_version, int to_version);
bool createObjectsTable();
// New utility functions
bool merge_existing_entry(const dbEntry& existing, const dbEntry& new_entry, dbEntry& merged);
bool insert_new_entry(const dbEntry& entry);
bool handle_tag_conflicts(const dbEntry& entry);
};
} // namespace simple_object_storage