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),
CustomLine(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
CustomLine(String)
Add some custom SQL if all else fails
Trait Implementations§
Source§impl Clone for DatabaseChange
impl Clone for DatabaseChange
Source§fn clone(&self) -> DatabaseChange
fn clone(&self) -> DatabaseChange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DatabaseChange
impl !RefUnwindSafe for DatabaseChange
impl !Send for DatabaseChange
impl !Sync for DatabaseChange
impl Unpin for DatabaseChange
impl !UnwindSafe for DatabaseChange
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