Skip to main content

Delete

Struct Delete 

Source
pub struct Delete<T> {
    pub table: Table<T>,
    pub query: Query,
    /* private fields */
}
Expand description

A typed delete statement under construction.

Fields§

§table: Table<T>

Delete target table.

§query: Query

Shared query state used for filters, CTEs, and parameters.

Implementations§

Source§

impl<T> Delete<T>

Source

pub fn with<C>(self, ctes: C) -> Delete<T>
where C: IntoCtes,

Attaches a common table expression to the delete.

Source

pub fn with_recursive<C>(self, ctes: C) -> Delete<T>
where C: IntoCtes,

Attaches a recursive common table expression to the delete.

Source

pub fn filter<F>(self, clause: F) -> Delete<T>
where F: LowerFilter,

Adds a where predicate combined with and.

Source

pub fn or_filter<F>(self, clause: F) -> Delete<T>
where F: LowerFilter,

Adds a where predicate combined with or.

Source

pub fn into_compiled<D>(self) -> TypedCompiled<T>
where D: HasDialect,

Compiles the delete into the typed representation used by executors.

Source

pub fn to_debug_sql<D>(&mut self) -> String
where D: HasDialect,

Emits SQL with appended debug parameter output.

Source

pub fn to_sql<D>(&mut self) -> String
where D: HasDialect,

Emits SQL for the requested dialect.

Source§

impl<T> Delete<T>

Source

pub fn force(self) -> Delete<T>

Source§

impl<T> Delete<T>

Source

pub async fn execute<E>(self, exec: E) -> Result<ExecResult, Error>
where E: Executor,

Auto Trait Implementations§

§

impl<T> Freeze for Delete<T>

§

impl<T> RefUnwindSafe for Delete<T>
where T: RefUnwindSafe,

§

impl<T> Send for Delete<T>
where T: Send,

§

impl<T> Sync for Delete<T>
where T: Sync,

§

impl<T> Unpin for Delete<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Delete<T>

§

impl<T> UnwindSafe for Delete<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Key> RelationForeignKey<Key> for Key

Source§

fn from_relation_key(key: Key) -> Key

Source§

impl<Key, T> RelationForeignKeyRef<Key> for T
where Key: Clone, T: RelationForeignKey<Key>,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.