[][src]Struct schemamama_rusqlite::SqliteAdapter

pub struct SqliteAdapter { /* fields omitted */ }

An adapter that allows its migrations to act upon PostgreSQL connection transactions.

Methods

impl SqliteAdapter[src]

pub fn new(connection: Rc<RefCell<SqliteConnection>>) -> SqliteAdapter[src]

Create a new migrator tied to a SQLite connection.

pub fn setup_schema(&self)[src]

Create the tables Schemamama requires to keep track of schema state. If the tables already exist, this function has no operation.

Trait Implementations

impl Adapter for SqliteAdapter[src]

type MigrationType = dyn SqliteMigration

An alias to a specific trait that extends Migration. Typically, the aforementioned trait will declare functions that the adapter will use to migrate upwards and downwards. Read more

type Error = SqliteMigrationError

An adapter-specific error type that can be returned from any of this trait's methods.

fn current_version(&self) -> Result<Option<Version>>[src]

Panics if setup_schema hasn't previously been called or if the query otherwise fails.

fn migrated_versions(&self) -> Result<BTreeSet<Version>>[src]

Panics if setup_schema hasn't previously been called or if the query otherwise fails.

fn apply_migration(&self, migration: &dyn SqliteMigration) -> Result<()>[src]

Panics if setup_schema hasn't previously been called or if the migration otherwise fails.

fn revert_migration(&self, migration: &dyn SqliteMigration) -> Result<()>[src]

Panics if setup_schema hasn't previously been called or if the migration otherwise fails.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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