mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-18 18:52:48 +00:00
feat(cdclient): make a new CDServer.sqlite off-thread and swap tables in place
CDClientSnapshot converts a copy of the client's fdb into its own CDServer-<hash>.sqlite with the cdserver migrations applied, on its own connection. CDClientDatabase::Reconnect opens the new file before letting go of the old one; CDClientManager::Reload empties every table (old entries kept alive so references from spawned objects stay valid), retires the old fdb view and loads again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,12 @@ namespace CDClientDatabase {
|
||||
*/
|
||||
void Connect(const std::string& filename);
|
||||
|
||||
/**
|
||||
* Switches to another CDServer.sqlite (a CDClient reload, see FdbSnapshot.h). The new file is opened before the
|
||||
* old connection is let go; throws CppSQLite3Exception and keeps the old one if it can't be opened.
|
||||
*/
|
||||
void Reconnect(const std::string& filename);
|
||||
|
||||
//! Queries the CDClient
|
||||
/*!
|
||||
\param query The query
|
||||
|
||||
Reference in New Issue
Block a user