pub struct FluentDeleteQuery<'a, E>where
E: EntityKind,{ /* private fields */ }Expand description
FluentDeleteQuery
Session-bound delete query wrapper.
This type owns intent construction and execution routing only.
All result projection and cardinality handling lives on Response<E>.
Implementations§
Source§impl<'a, E> FluentDeleteQuery<'a, E>where
E: EntityKind,
impl<'a, E> FluentDeleteQuery<'a, E>where
E: EntityKind,
pub const fn query(&self) -> &Query<E>
Sourcepub fn by_id(self, id: Id<E>) -> Self
pub fn by_id(self, id: Id<E>) -> Self
Set the access path to a single typed primary-key value.
Id<E> is treated as a plain query input value here. It does not grant access.
Sourcepub fn by_ids<I>(self, ids: I) -> Selfwhere
I: IntoIterator<Item = Id<E>>,
pub fn by_ids<I>(self, ids: I) -> Selfwhere
I: IntoIterator<Item = Id<E>>,
Set the access path to multiple typed primary-key values.
IDs are public and may come from untrusted input sources.
pub fn filter(self, predicate: Predicate) -> Self
pub fn filter_expr(self, expr: FilterExpr) -> Result<Self, QueryError>
pub fn sort_expr(self, expr: SortExpr) -> Result<Self, QueryError>
pub fn order_by(self, field: impl AsRef<str>) -> Self
pub fn order_by_desc(self, field: impl AsRef<str>) -> Self
pub fn limit(self, limit: u32) -> Self
pub fn explain(&self) -> Result<ExplainPlan, QueryError>
pub fn plan(&self) -> Result<ExecutablePlan<E>, QueryError>
Sourcepub fn execute(&self) -> Result<Response<E>, QueryError>where
E: EntityValue,
pub fn execute(&self) -> Result<Response<E>, QueryError>where
E: EntityValue,
Execute this delete using the session’s policy settings.
All result inspection and projection is performed on Response<E>.
Sourcepub fn is_empty(&self) -> Result<bool, QueryError>where
E: EntityValue,
pub fn is_empty(&self) -> Result<bool, QueryError>where
E: EntityValue,
Execute and return whether any rows were affected.
Sourcepub fn count(&self) -> Result<u32, QueryError>where
E: EntityValue,
pub fn count(&self) -> Result<u32, QueryError>where
E: EntityValue,
Execute and return the number of affected rows.
Sourcepub fn require_one(&self) -> Result<(), QueryError>where
E: EntityValue,
pub fn require_one(&self) -> Result<(), QueryError>where
E: EntityValue,
Execute and require exactly one affected row.
Sourcepub fn require_some(&self) -> Result<(), QueryError>where
E: EntityValue,
pub fn require_some(&self) -> Result<(), QueryError>where
E: EntityValue,
Execute and require at least one affected row.
Source§impl<E> FluentDeleteQuery<'_, E>
impl<E> FluentDeleteQuery<'_, E>
Auto Trait Implementations§
impl<'a, E> Freeze for FluentDeleteQuery<'a, E>
impl<'a, E> !RefUnwindSafe for FluentDeleteQuery<'a, E>
impl<'a, E> !Send for FluentDeleteQuery<'a, E>
impl<'a, E> !Sync for FluentDeleteQuery<'a, E>
impl<'a, E> Unpin for FluentDeleteQuery<'a, E>
impl<'a, E> UnsafeUnpin for FluentDeleteQuery<'a, E>
impl<'a, E> !UnwindSafe for FluentDeleteQuery<'a, E>
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