Enum barrel::DatabaseChange
source · pub enum DatabaseChange {
CreateTable(Table, Rc<dyn Fn(&mut Table)>),
CreateTableIfNotExists(Table, Rc<dyn Fn(&mut Table)>),
ChangeTable(Table, Rc<dyn Fn(&mut Table)>),
RenameTable(String, String),
DropTable(String),
DropTableIfExists(String),
}
Expand description
An enum set that represents a single change on a database
Variants
CreateTable(Table, Rc<dyn Fn(&mut Table)>)
Create a new table
CreateTableIfNotExists(Table, Rc<dyn Fn(&mut Table)>)
Create a new table only if it doesn’t exist yet
ChangeTable(Table, Rc<dyn Fn(&mut Table)>)
Change fields on an existing table
RenameTable(String, String)
Rename a table
DropTable(String)
Drop an existing table
DropTableIfExists(String)
Only drop a table if it exists
Trait Implementations
sourceimpl Clone for DatabaseChange
impl Clone for DatabaseChange
sourcefn clone(&self) -> DatabaseChange
fn clone(&self) -> DatabaseChange
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl !RefUnwindSafe for DatabaseChange
impl !Send for DatabaseChange
impl !Sync for DatabaseChange
impl Unpin for DatabaseChange
impl !UnwindSafe for DatabaseChange
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more