mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 04:32:58 +02:00
refactor database engine/options; add column descriptors
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
02f19cf951
commit
6a0f9add0c
21 changed files with 1358 additions and 965 deletions
16
src/database/engine/repair.rs
Normal file
16
src/database/engine/repair.rs
Normal 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(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue