[−][src]Struct oapth::Commands
SQL commands facade
Implementations
impl<B> Commands<B> where
B: Backend,
[src]
B: Backend,
pub async fn migrate<'a, I>(
&'a mut self,
mg: &'a MigrationGroup,
migrations: I
) -> Result<()> where
I: Clone + Iterator<Item = &'a Migration> + 'a,
[src]
&'a mut self,
mg: &'a MigrationGroup,
migrations: I
) -> Result<()> where
I: Clone + Iterator<Item = &'a Migration> + 'a,
Migrates everything inside a group that is greater than the last migration version within the database
impl<B> Commands<B> where
B: Backend,
[src]
B: Backend,
pub async fn rollback<'a, I, '_>(
&'a mut self,
mg: &'_ MigrationGroup,
migrations: I,
version: i32
) -> Result<()> where
I: Clone + DoubleEndedIterator<Item = &'a Migration> + 'a,
[src]
&'a mut self,
mg: &'_ MigrationGroup,
migrations: I,
version: i32
) -> Result<()> where
I: Clone + DoubleEndedIterator<Item = &'a Migration> + 'a,
Rollbacks the migrations of a group to a given version
.
Before issuing a rollback, all migrations are validated.
impl<B> Commands<B> where
B: Backend,
[src]
B: Backend,
pub async fn validate<'a, I, '_>(
&'a mut self,
mg: &'_ MigrationGroup,
migrations: I
) -> Result<()> where
I: Iterator<Item = &'a Migration>,
[src]
&'a mut self,
mg: &'_ MigrationGroup,
migrations: I
) -> Result<()> where
I: Iterator<Item = &'a Migration>,
Verifies if the provided migrations are a superset of the migrations within the database by verification their checksums.
impl<B> Commands<B> where
B: Backend,
[src]
B: Backend,
pub fn new(backend: B) -> Self
[src]
Creates a new instance from a given backend.
pub fn backend_mut(&mut self) -> &mut B
[src]
Returns the underlying backend
Trait Implementations
Auto Trait Implementations
impl<B> Send for Commands<B> where
B: Send,
B: Send,
impl<B> Sync for Commands<B> where
B: Sync,
B: Sync,
impl<B> Unpin for Commands<B> where
B: Unpin,
B: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,