pub struct CqlMigrator { /* private fields */ }Expand description
Entrypoint / builder for running migrations.
Implementations§
Source§impl CqlMigrator
impl CqlMigrator
Sourcepub fn with_logger(self, log: fn(String)) -> Self
pub fn with_logger(self, log: fn(String)) -> Self
Add a logging function.
See CqlMigrator for an example.
Sourcepub fn continue_on_error(self, b: bool) -> Self
pub fn continue_on_error(self, b: bool) -> Self
If true, continue to run all migrations; default false.
Sourcepub async fn migrate(
&self,
db: &impl Db,
migrations: Vec<Migration>,
) -> GenResult<()>
pub async fn migrate( &self, db: &impl Db, migrations: Vec<Migration>, ) -> GenResult<()>
Runs a list of provided migrations.
See CqlMigrator for an example.
Sourcepub async fn migrate_files(
&self,
db: &impl Db,
path: Box<Path>,
) -> GenResult<()>
pub async fn migrate_files( &self, db: &impl Db, path: Box<Path>, ) -> GenResult<()>
Run migrations in a folder or file.
See CqlMigrator for an example.
Trait Implementations§
Source§impl Clone for CqlMigrator
impl Clone for CqlMigrator
Source§fn clone(&self) -> CqlMigrator
fn clone(&self) -> CqlMigrator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CqlMigrator
impl RefUnwindSafe for CqlMigrator
impl Send for CqlMigrator
impl Sync for CqlMigrator
impl Unpin for CqlMigrator
impl UnwindSafe for CqlMigrator
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