feat: add /history switch for runtime database backend switching
Some checks failed
CI Code / Check coding style (pull_request) Successful in 47s
CI Code / Check spelling (pull_request) Successful in 55s
CI Code / Linux (ubuntu) (pull_request) Failing after 2m46s
CI Code / Code Coverage (pull_request) Failing after 5m17s
CI Code / Linux (debian) (pull_request) Failing after 6m3s
CI Code / Linux (arch) (pull_request) Failing after 7m21s
Some checks failed
CI Code / Check coding style (pull_request) Successful in 47s
CI Code / Check spelling (pull_request) Successful in 55s
CI Code / Linux (ubuntu) (pull_request) Failing after 2m46s
CI Code / Code Coverage (pull_request) Failing after 5m17s
CI Code / Linux (debian) (pull_request) Failing after 6m3s
CI Code / Linux (arch) (pull_request) Failing after 7m21s
Add log_database_switch_backend() that closes the current backend, updates PREF_DBLOG preference, and reinitializes with the new backend without requiring a reconnect or restart. New command: /history switch sqlite|flatfile - Validates connection state and backend name - Skips if already using the requested backend - Autocomplete support for the subcommand
This commit is contained in:
@@ -93,6 +93,7 @@ db_backend_t* db_backend_flatfile(void);
|
||||
|
||||
// Public API (dispatches to active_db_backend)
|
||||
gboolean log_database_init(ProfAccount* account);
|
||||
gboolean log_database_switch_backend(const char* new_backend);
|
||||
void log_database_add_incoming(ProfMessage* message);
|
||||
void log_database_add_outgoing_chat(const char* const id, const char* const barejid, const char* const message, const char* const replace_id, prof_enc_t enc);
|
||||
void log_database_add_outgoing_muc(const char* const id, const char* const barejid, const char* const message, const char* const replace_id, prof_enc_t enc);
|
||||
|
||||
Reference in New Issue
Block a user