pub struct MigratedDatabaseFile<CI: ConnectionInitializer> {
pub connection_initializer: CI,
pub path: PathBuf,
/* private fields */
}
Fields§
§connection_initializer: CI
§path: PathBuf
Implementations§
source§impl<CI: ConnectionInitializer> MigratedDatabaseFile<CI>
impl<CI: ConnectionInitializer> MigratedDatabaseFile<CI>
pub fn new(connection_initializer: CI, init_sql: &str) -> Self
pub fn new_with_flags( connection_initializer: CI, init_sql: &str, open_flags: OpenFlags, ) -> Self
sourcepub fn upgrade_to(&self, version: u32)
pub fn upgrade_to(&self, version: u32)
Attempt to run all upgrades up to a specific version.
This will result in a panic if an upgrade fails to run.
sourcepub fn run_all_upgrades(&self)
pub fn run_all_upgrades(&self)
Attempt to run all upgrades
This will result in a panic if an upgrade fails to run.
pub fn assert_schema_matches_new_database(&self)
pub fn open(&self) -> Connection
Auto Trait Implementations§
impl<CI> Freeze for MigratedDatabaseFile<CI>where
CI: Freeze,
impl<CI> RefUnwindSafe for MigratedDatabaseFile<CI>where
CI: RefUnwindSafe,
impl<CI> Send for MigratedDatabaseFile<CI>where
CI: Send,
impl<CI> Sync for MigratedDatabaseFile<CI>where
CI: Sync,
impl<CI> Unpin for MigratedDatabaseFile<CI>where
CI: Unpin,
impl<CI> UnwindSafe for MigratedDatabaseFile<CI>where
CI: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more