pub(crate) fn recover_db(&self, db_name: DatabaseName<'static>) -> Result<DatabaseHandle<'_>> {
        let mut state = self.state.write().expect("mutex poisoned");
        ensure!(
            !state.reservations.contains(&db_name),
            DatabaseReserved { db_name }
        );

        let db_state = state
            .databases
            .get(&db_name)
            .cloned()
            .context(DatabaseNotFound { db_name: &db_name })?;

        ensure!(
            !db_state.is_initialized(),
            DatabaseAlreadyExists { db_name }
        );

        state.reservations.insert(db_name);
        Ok(DatabaseHandle {
            state: Some(db_state),
            config: self,
        })
    }
/// Get handle to recover database out of an uninitialized state.
///
/// The state of the handle will be identical to the one that was last committed.
///
/// While the handle is held, no other operations for the given database can be executed.
///
/// This only works if the database is known but is uninitialized. To create a new database that is not yet known,
/// see [`create_db`](Self::create_db). To do maintenance work on data linked to the database (e.g. the catalog)
/// without initializing it, see [`block_db`](Self::block_db).
Get handle to recover database out of an uninitialized state.
The state of the handle will be identical to the one that was last committed.

While the handle is held, no other operations for the given database can be executed.

This only works if the database is known but is uninitialized. To create a new database that is not yet known,
see [`create_db`](Self::create_db). To do maintenance work on data linked to the database
without initializing it, see [`block_db`](Self::block_db).
Get handle to recover database out of an uninitialized state . The state of the handle will be identical to the one that was last committed . While the handle is held no other operations for the given database can be executed . This only works if the database is known but is uninitialized . To create a new database that is not yet known see [ ` create_db ` ] ( Self :: create_db ) . To do maintenance work on data linked to the database without initializing it see [ ` block_db ` ] ( Self :: block_db ) .
pub(crate) fn recover_db(&self, db_name: DatabaseName<'static>) -> Result<DatabaseHandle<'_>> {
        let mut state = self.state.write().expect("mutex poisoned");
        ensure!(
            !state.reservations.contains(&db_name),
            DatabaseReserved { db_name }
        );
        let db_state = state
            .databases
            .get(&db_name)
            .cloned()
            .context(DatabaseNotFound { db_name: &db_name })?;
        ensure!(
            !db_state.is_initialized(),
            DatabaseAlreadyExists { db_name }
        );
        state.reservations.insert(db_name);
        Ok(DatabaseHandle {
            state: Some(db_state),
            config: self,
        })
    }
pub ( crate ) fn recover_db ( & self , db_name : DatabaseName < ' static > ) -> Result < DatabaseHandle < ' _ > > { let mut state = self . state . write ( ) . expect ( " " ) ; ensure ! ( state reservations contains ( db_name ) DatabaseReserved { db_name } ) ; let db_state = state . databases . get ( & db_name ) . cloned ( ) . context ( DatabaseNotFound { db_name : & db_name } ) ? ; ensure ! ( db_state is_initialized ( ) DatabaseAlreadyExists { db_name } ) ; state . reservations . insert ( db_name ) ; Ok ( DatabaseHandle { state : Some ( db_state ) , config : self , } ) }
Get handle to recover database out of an uninitialized state.
Get handle to recover database out of an uninitialized state .
&self
db_name
DatabaseName<'static>
&self
db_name
DatabaseName<'static>