pub struct DeleteQuery {
pub with: With,
pub table: TableRef,
pub where_: Where,
pub returning: Returning,
}Expand description
A SQLite DELETE.
From https://www.sqlite.org/lang_delete.html:
[ WITH [ RECURSIVE ] common-table-expression [, ...] ]
DELETE FROM qualified-table-name
[ WHERE expr ]
[ RETURNING result-column [, ...] ]That is the whole statement — the shortest of the four by a wide margin.
PostgreSQL’s USING has no counterpart, so there is no from-item, no join and
no HasTableRef here; a delete driven by another table is written with a
sub-query in the WHERE, which is what SQLite gives instead. There is also no
OR clause: SQLite’s conflict-clause is offered on INSERT and UPDATE
only, since a delete cannot violate a uniqueness constraint.
Fields§
§with: WithWITH ….
table: TableRefThe table rows are deleted from.
where_: WhereWHERE ….
returning: ReturningRETURNING …. SQLite 3.35 and later.
Implementations§
Source§impl DeleteQuery
impl DeleteQuery
Sourcepub fn new() -> DeleteQuery
pub fn new() -> DeleteQuery
A DELETE with nothing set yet.
Sourcepub fn apply(&mut self, mods: impl Mod<DeleteQuery>)
pub fn apply(&mut self, mods: impl Mod<DeleteQuery>)
Apply more mods to an existing query.
Trait Implementations§
Source§impl Clone for DeleteQuery
impl Clone for DeleteQuery
Source§fn clone(&self) -> DeleteQuery
fn clone(&self) -> DeleteQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeleteQuery
impl Debug for DeleteQuery
Source§impl Default for DeleteQuery
impl Default for DeleteQuery
Source§fn default() -> DeleteQuery
fn default() -> DeleteQuery
Returns the “default value” for a type. Read more
Source§impl Expression for DeleteQuery
impl Expression for DeleteQuery
Source§impl HasReturning for DeleteQuery
impl HasReturning for DeleteQuery
Source§fn returning_mut(&mut self) -> &mut Returning
fn returning_mut(&mut self) -> &mut Returning
The
RETURNING clause to modify.Source§impl HasTargetTable for DeleteQuery
impl HasTargetTable for DeleteQuery
Source§fn target_table_mut(&mut self) -> &mut TableRef
fn target_table_mut(&mut self) -> &mut TableRef
The target table to modify.
Source§impl HasWhere for DeleteQuery
impl HasWhere for DeleteQuery
Source§impl HasWith for DeleteQuery
impl HasWith for DeleteQuery
Source§impl IntoExprList for DeleteQuery
impl IntoExprList for DeleteQuery
Source§fn into_expr_list(self) -> Vec<Expr>
fn into_expr_list(self) -> Vec<Expr>
Perform the conversion.
Source§impl Query for DeleteQuery
impl Query for DeleteQuery
Source§impl<H, L, M> QueryExtensions<H, L, M> for DeleteQuery
impl<H, L, M> QueryExtensions<H, L, M> for DeleteQuery
Auto Trait Implementations§
impl !RefUnwindSafe for DeleteQuery
impl !UnwindSafe for DeleteQuery
impl Freeze for DeleteQuery
impl Send for DeleteQuery
impl Sync for DeleteQuery
impl Unpin for DeleteQuery
impl UnsafeUnpin for DeleteQuery
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