pub struct RbatisMigrationDriver { /* private fields */ }
Expand description
Rbatis implementation of MigrationStateManager
and MigrationExecutor
Implementations§
Source§impl RbatisMigrationDriver
impl RbatisMigrationDriver
Sourcepub fn new(
db: Arc<RBatis>,
migrations_table_name: Option<&str>,
) -> RbatisMigrationDriver
pub fn new( db: Arc<RBatis>, migrations_table_name: Option<&str>, ) -> RbatisMigrationDriver
Create a new driver
db
: TheRbatis
instance for accessing the databasemigrations_table_name
: The optional name of the table the migration state information should be stored in. IfNone
, theDEFAULT_MIGRATIONS_TABLE
will be used.
Sourcepub fn driver_type(&self) -> Result<RbatisDbDriverType>
pub fn driver_type(&self) -> Result<RbatisDbDriverType>
The the driver type of the Rbatis
instance
This method will get the driver type from Rbatis
(which is a string) and convert it into
an RbatisDbDriverType
. Other(String)
will be used for any database drivers not directly
known to flyway-rbatis
.
Trait Implementations§
Source§impl MigrationExecutor for RbatisMigrationDriver
Implementation of the MigrationExecutor
impl MigrationExecutor for RbatisMigrationDriver
Implementation of the MigrationExecutor
fn begin_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_changelog_file<'life0, 'life1, 'async_trait>(
&'life0 self,
changelog_file: &'life1 ChangelogFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commit_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rollback_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl MigrationStateManager for RbatisMigrationDriver
Implementation of the MigrationStateManager
impl MigrationStateManager for RbatisMigrationDriver
Implementation of the MigrationStateManager
Source§fn prepare<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Prepare the DB for migration state management Read more
Source§fn lowest_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<MigrationState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lowest_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<MigrationState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the lowest deployed version
Source§fn highest_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<MigrationState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn highest_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<MigrationState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the highest deployed version
Source§fn list_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MigrationState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MigrationState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a list of all deployed versions
Source§fn begin_version<'life0, 'life1, 'async_trait>(
&'life0 self,
changelog_file: &'life1 ChangelogFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn begin_version<'life0, 'life1, 'async_trait>(
&'life0 self,
changelog_file: &'life1 ChangelogFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Begin a new version
Source§fn finish_version<'life0, 'life1, 'async_trait>(
&'life0 self,
changelog_file: &'life1 ChangelogFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn finish_version<'life0, 'life1, 'async_trait>(
&'life0 self,
changelog_file: &'life1 ChangelogFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Finish a new version Read more
Source§fn skip_version<'life0, 'life1, 'async_trait>(
&'life0 self,
changelog_file: &'life1 ChangelogFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn skip_version<'life0, 'life1, 'async_trait>(
&'life0 self,
changelog_file: &'life1 ChangelogFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Skip version while sql fail
Auto Trait Implementations§
impl !Freeze for RbatisMigrationDriver
impl !RefUnwindSafe for RbatisMigrationDriver
impl Send for RbatisMigrationDriver
impl Sync for RbatisMigrationDriver
impl Unpin for RbatisMigrationDriver
impl !UnwindSafe for RbatisMigrationDriver
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