pub struct SqliteStore { /* private fields */ }Expand description
SQLite-backed migration store.
Stores migration history in a _migrations table.
Implementations§
Source§impl SqliteStore
impl SqliteStore
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn open(path: impl AsRef<Path>) -> Result<Self, Error>
Open a SQLite database for migration tracking
Sourcepub fn open_in_memory() -> Result<Self, Error>
pub fn open_in_memory() -> Result<Self, Error>
Open an in-memory SQLite database
Sourcepub fn connection(&self) -> &Connection
pub fn connection(&self) -> &Connection
Get the underlying connection
Sourcepub fn into_connection(self) -> Connection
pub fn into_connection(self) -> Connection
Consume and return the underlying connection
Trait Implementations§
Source§impl MigrationStore for SqliteStore
impl MigrationStore for SqliteStore
Source§fn applied(&self) -> Result<Vec<MigrationRecord>>
fn applied(&self) -> Result<Vec<MigrationRecord>>
Get all applied migrations, sorted by version ascending
Source§fn mark_applied(&mut self, version: u64, name: &str) -> Result<()>
fn mark_applied(&mut self, version: u64, name: &str) -> Result<()>
Record a migration as applied
Source§fn mark_rolled_back(&mut self, version: u64) -> Result<()>
fn mark_rolled_back(&mut self, version: u64) -> Result<()>
Record a migration as rolled back (remove from applied)
Auto Trait Implementations§
impl !Freeze for SqliteStore
impl !RefUnwindSafe for SqliteStore
impl Send for SqliteStore
impl !Sync for SqliteStore
impl Unpin for SqliteStore
impl !UnwindSafe for SqliteStore
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