pub struct Delete<'a> { /* private fields */ }
Expand description
A builder for a DELETE
statement.
Implementations§
Source§impl<'a> Delete<'a>
impl<'a> Delete<'a>
Sourcepub fn from_table<T>(table: T) -> Self
pub fn from_table<T>(table: T) -> Self
Creates a new DELETE
statement for the given table.
let query = Delete::from_table("users");
let (sql, _) = Sqlite::build(query);
assert_eq!("DELETE FROM `users`", sql);
Sourcepub fn so_that<T>(self, conditions: T) -> Selfwhere
T: Into<ConditionTree<'a>>,
pub fn so_that<T>(self, conditions: T) -> Selfwhere
T: Into<ConditionTree<'a>>,
Adds WHERE
conditions to the query. See
Comparable for more examples.
let query = Delete::from_table("users").so_that("bar".equals(false));
let (sql, params) = Sqlite::build(query);
assert_eq!("DELETE FROM `users` WHERE `bar` = ?", sql);
assert_eq!(vec![ParameterizedValue::Boolean(false)], params);
Trait Implementations§
impl<'a> StructuralPartialEq for Delete<'a>
Auto Trait Implementations§
impl<'a> Freeze for Delete<'a>
impl<'a> RefUnwindSafe for Delete<'a>
impl<'a> Send for Delete<'a>
impl<'a> Sync for Delete<'a>
impl<'a> Unpin for Delete<'a>
impl<'a> UnwindSafe for Delete<'a>
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