Struct Delete
pub struct Delete {
pub from: Source,
pub filter: Filter,
pub returning: Option<Returning>,
}Expand description
A DELETE statement that removes existing records.
Specifies a source to delete from, a filter selecting which records to delete, and an optional returning clause.
§Examples
ⓘ
use toasty_core::stmt::{Delete, Source, Filter};
use toasty_core::schema::app::ModelId;
let delete = Delete {
from: Source::from(ModelId(0)),
filter: Filter::default(),
returning: None,
};Fields§
§from: SourceThe source to delete from (FROM clause).
filter: FilterFilter selecting which records to delete (WHERE clause).
returning: Option<Returning>Optional RETURNING clause.
Implementations§
Trait Implementations§
§impl<'a, T> IntoExprTarget<'a, T> for &'a Deletewhere
T: Resolve,
impl<'a, T> IntoExprTarget<'a, T> for &'a Deletewhere
T: Resolve,
§fn into_expr_target(self, schema: &'a T) -> ExprTarget<'a>
fn into_expr_target(self, schema: &'a T) -> ExprTarget<'a>
Converts
self into an ExprTarget using the provided schema.impl StructuralPartialEq for Delete
Auto Trait Implementations§
impl Freeze for Delete
impl RefUnwindSafe for Delete
impl Send for Delete
impl Sync for Delete
impl Unpin for Delete
impl UnwindSafe for Delete
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