pub enum Statement {
Show 14 variants
AddColumn(AddColumn),
AlterColumn(AlterColumn),
AlterTable(AlterTable),
CopyTable(CopyTable),
CreateIndex(CreateIndex),
CreateTable(CreateTable),
DropColumn(DropColumn),
DropTable(DropTable),
DropIndex(DropIndex),
Pragma(Pragma),
Delete(Delete),
Insert(Insert),
Query(Query),
Update(Update),
}Variants§
AddColumn(AddColumn)
AlterColumn(AlterColumn)
AlterTable(AlterTable)
CopyTable(CopyTable)
CreateIndex(CreateIndex)
CreateTable(CreateTable)
DropColumn(DropColumn)
DropTable(DropTable)
DropIndex(DropIndex)
Pragma(Pragma)
Delete(Delete)
Insert(Insert)
Query(Query)
Update(Update)
Implementations§
Source§impl Statement
impl Statement
Sourcepub fn add_column(column: &Column, capability: &Capability) -> Self
pub fn add_column(column: &Column, capability: &Capability) -> Self
Adds a column to a table.
Source§impl Statement
impl Statement
Sourcepub fn alter_column(
column: &Column,
changes: AlterColumnChanges,
capability: &Capability,
) -> Self
pub fn alter_column( column: &Column, changes: AlterColumnChanges, capability: &Capability, ) -> Self
Alters a column.
Source§impl Statement
impl Statement
Sourcepub fn alter_table_rename_to(table: &Table, new_name: &str) -> Self
pub fn alter_table_rename_to(table: &Table, new_name: &str) -> Self
Renames a table.
Source§impl Statement
impl Statement
pub fn create_index(index: &Index) -> Self
Source§impl Statement
impl Statement
pub fn create_table(table: &Table, capability: &Capability) -> Self
Source§impl Statement
impl Statement
Sourcepub fn drop_column(column: &Column) -> Self
pub fn drop_column(column: &Column) -> Self
Drops a column from a table.
This function does not add an IF EXISTS clause.
Sourcepub fn drop_column_if_exists(column: &Column) -> Self
pub fn drop_column_if_exists(column: &Column) -> Self
Drops a column from a table if it exists.
This function does add an IF EXISTS clause.
Source§impl Statement
impl Statement
Sourcepub fn drop_index(index: &Index) -> Self
pub fn drop_index(index: &Index) -> Self
Drops an index.
This function does not add an IF EXISTS clause.
Sourcepub fn drop_index_if_exists(index: &Index) -> Self
pub fn drop_index_if_exists(index: &Index) -> Self
Drops a index if it exists.
This function does add an IF EXISTS clause.
Source§impl Statement
impl Statement
Sourcepub fn drop_table(table: &Table) -> Self
pub fn drop_table(table: &Table) -> Self
Drops a table.
This function does not add an IF EXISTS clause.
Sourcepub fn drop_table_if_exists(table: &Table) -> Self
pub fn drop_table_if_exists(table: &Table) -> Self
Drops a table if it exists.
This function does add an IF EXISTS clause.
Source§impl Statement
impl Statement
Sourcepub fn pragma_enable_foreign_keys() -> Self
pub fn pragma_enable_foreign_keys() -> Self
Sets PRAGMA foreign_keys = ON.
Sourcepub fn pragma_disable_foreign_keys() -> Self
pub fn pragma_disable_foreign_keys() -> Self
Sets PRAGMA foreign_keys = OFF.
Trait Implementations§
Source§impl From<AlterColumn> for Statement
impl From<AlterColumn> for Statement
Source§fn from(value: AlterColumn) -> Self
fn from(value: AlterColumn) -> Self
Converts to this type from the input type.
Source§impl From<AlterTable> for Statement
impl From<AlterTable> for Statement
Source§fn from(value: AlterTable) -> Self
fn from(value: AlterTable) -> Self
Converts to this type from the input type.
Source§impl From<CreateIndex> for Statement
impl From<CreateIndex> for Statement
Source§fn from(value: CreateIndex) -> Self
fn from(value: CreateIndex) -> Self
Converts to this type from the input type.
Source§impl From<CreateTable> for Statement
impl From<CreateTable> for Statement
Source§fn from(value: CreateTable) -> Self
fn from(value: CreateTable) -> Self
Converts to this type from the input type.
Source§impl From<DropColumn> for Statement
impl From<DropColumn> for Statement
Source§fn from(value: DropColumn) -> Self
fn from(value: DropColumn) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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