refactor database engine/options; add column descriptors

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-01-06 14:07:26 +00:00
commit 6a0f9add0c
21 changed files with 1358 additions and 965 deletions

View file

@ -0,0 +1,16 @@
use std::path::PathBuf;
use conduwuit::{info, warn, Err, Result};
use rocksdb::Options;
use super::Db;
pub(crate) fn repair(db_opts: &Options, path: &PathBuf) -> Result {
warn!("Starting database repair. This may take a long time...");
match Db::repair(db_opts, path) {
| Ok(()) => info!("Database repair successful."),
| Err(e) => return Err!("Repair failed: {e:?}"),
}
Ok(())
}