[][src]Struct oapth::Commands

pub struct Commands<B> { /* fields omitted */ }

SQL commands facade

Implementations

impl<B> Commands<B> where
    B: Backend
[src]

pub async fn migrate<'a, I>(
    &'a mut self,
    mg: &'a MigrationGroup,
    migrations: I
) -> Result<()> where
    I: Clone + Iterator<Item = &'a Migration> + 'a, 
[src]

Migrates everything inside a group that is greater than the last migration version within the database

impl<B> Commands<B> where
    B: Backend
[src]

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]

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]

pub async fn validate<'a, I, '_>(
    &'a mut self,
    mg: &'_ MigrationGroup,
    migrations: I
) -> Result<()> where
    I: Iterator<Item = &'a Migration>, 
[src]

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]

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

impl<B: Debug> Debug for Commands<B>[src]

Auto Trait Implementations

impl<B> Send for Commands<B> where
    B: Send

impl<B> Sync for Commands<B> where
    B: Sync

impl<B> Unpin for Commands<B> where
    B: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.