feat: add /history switch for runtime database backend switching
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