pub fn open_database() -> Option<sled::Db> {
    let _config = sled::Config::default().path("database");
    //.use_compression(true)
    //.compression_factor(10);

    let db: sled::Db = match _config.open() {
        Ok(database) => database,
        Err(e) => {
            error!("Error opening database! {}", e);
            return None;
        }
    };

    return Some(db);
}
// Open the base database (will be stored in a tauri state)
// Path will eventually be set differently on Windows/Linux/MacOS
// TODO: loop until database can be opened
Open the base database (will be stored in a tauri state)
Path will eventually be set differently on Windows/Linux/MacOS
TODO: loop until database can be opened
Open the base database ( will be stored in a tauri state ) Path will eventually be set differently on Windows / Linux / MacOS TODO : loop until database can be opened
pub fn open_database() -> Option<sled::Db> {
    let _config = sled::Config::default().path("database");
    //.use_compression(true)
    //.compression_factor(10);
    let db: sled::Db = match _config.open() {
        Ok(database) => database,
        Err(e) => {
            error!("Error opening database! {}", e);
            return None;
        }
    };
    return Some(db);
}
pub fn open_database ( ) -> Option < sled :: Db > { let _config = sled :: Config :: default ( ) . path ( " " ) ; //.use_compression(true) //.compression_factor(10); let db : sled :: Db = match _config . open ( ) { Ok ( database ) => database , Err ( e ) => { error ! ( " " e ) ; return None ; } } ; return Some ( db ) ; }
Open the base database (will be stored in a tauri state)
Path will eventually be set differently on Windows/Linux/MacOS
TODO: loop until database can be opened
Open the base database ( will be stored in a tauri state ) Path will eventually be set differently on Windows / Linux / MacOS TODO : loop until database can be opened