pub struct AlterTable { /* private fields */ }Expand description
An ALTER TABLE statement.
SQLite accepts one operation per statement, so the builder keeps a single operation and the last setter wins.
Implementations§
Source§impl AlterTable
impl AlterTable
Sourcepub fn add_column(self, column: ColumnDef) -> Self
pub fn add_column(self, column: ColumnDef) -> Self
Sets the operation to ADD COLUMN.
Sourcepub fn drop_column(self, column: impl IntoIden) -> Self
pub fn drop_column(self, column: impl IntoIden) -> Self
Sets the operation to DROP COLUMN.
Sourcepub fn rename_column(self, from: impl IntoIden, to: impl IntoIden) -> Self
pub fn rename_column(self, from: impl IntoIden, to: impl IntoIden) -> Self
Sets the operation to RENAME COLUMN a TO b.
Sourcepub fn alter_column(self, name: impl IntoIden, column: ColumnDef) -> Self
pub fn alter_column(self, name: impl IntoIden, column: ColumnDef) -> Self
Sets the operation to the Turso extension ALTER COLUMN name TO <new definition>.
Trait Implementations§
Source§impl Build for AlterTable
impl Build for AlterTable
Source§impl Clone for AlterTable
impl Clone for AlterTable
Source§impl Debug for AlterTable
impl Debug for AlterTable
Source§impl Default for AlterTable
impl Default for AlterTable
Source§impl PartialEq for AlterTable
impl PartialEq for AlterTable
impl StructuralPartialEq for AlterTable
Auto Trait Implementations§
impl Freeze for AlterTable
impl RefUnwindSafe for AlterTable
impl Send for AlterTable
impl Sync for AlterTable
impl Unpin for AlterTable
impl UnsafeUnpin for AlterTable
impl UnwindSafe for AlterTable
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