pub struct SessionDeleteQuery<'a, C: CanisterKind, E: EntityKind<Canister = C>> { /* private fields */ }Expand description
SessionDeleteQuery
Fluent, session-bound delete query wrapper that keeps query intent pure
while routing execution through the DbSession boundary.
Implementations§
Source§impl<'a, C: CanisterKind, E: EntityKind<Canister = C>> SessionDeleteQuery<'a, C, E>
impl<'a, C: CanisterKind, E: EntityKind<Canister = C>> SessionDeleteQuery<'a, C, E>
pub const fn query(&self) -> &Query<E>
Sourcepub fn many<I>(self, keys: I) -> Selfwhere
I: IntoIterator<Item = E::PrimaryKey>,
pub fn many<I>(self, keys: I) -> Selfwhere
I: IntoIterator<Item = E::PrimaryKey>,
Delete multiple entities by primary key.
Semantics:
- Equivalent to
WHERE pk IN (…) - Uses key-based access (ByKey / ByKeys)
- Missing keys are ignored in MissingOk mode
- Strict mode treats missing rows as corruption
Sourcepub fn filter(self, predicate: Predicate) -> Self
pub fn filter(self, predicate: Predicate) -> Self
Add a predicate, implicitly AND-ing with any existing predicate.
Sourcepub fn filter_expr(self, expr: FilterExpr) -> Result<Self, QueryError>
pub fn filter_expr(self, expr: FilterExpr) -> Result<Self, QueryError>
Apply a dynamic filter expression.
Sourcepub fn sort_expr(self, expr: SortExpr) -> Result<Self, QueryError>
pub fn sort_expr(self, expr: SortExpr) -> Result<Self, QueryError>
Apply a dynamic sort expression.
Sourcepub fn order_by_desc(self, field: impl AsRef<str>) -> Self
pub fn order_by_desc(self, field: impl AsRef<str>) -> Self
Append a descending sort key.
pub fn explain(&self) -> Result<ExplainPlan, QueryError>
pub fn plan(&self) -> Result<ExecutablePlan<E>, QueryError>
pub fn execute(&self) -> Result<Response<E>, QueryError>
Sourcepub fn delete_rows(&self) -> Result<Response<E>, QueryError>
pub fn delete_rows(&self) -> Result<Response<E>, QueryError>
Execute a delete query and return the deleted rows.
Source§impl<C: CanisterKind, E: EntityKind<Canister = C, PrimaryKey = ()>> SessionDeleteQuery<'_, C, E>
impl<C: CanisterKind, E: EntityKind<Canister = C, PrimaryKey = ()>> SessionDeleteQuery<'_, C, E>
Auto Trait Implementations§
impl<'a, C, E> Freeze for SessionDeleteQuery<'a, C, E>
impl<'a, C, E> !RefUnwindSafe for SessionDeleteQuery<'a, C, E>
impl<'a, C, E> !Send for SessionDeleteQuery<'a, C, E>
impl<'a, C, E> !Sync for SessionDeleteQuery<'a, C, E>
impl<'a, C, E> Unpin for SessionDeleteQuery<'a, C, E>where
E: Unpin,
impl<'a, C, E> UnsafeUnpin for SessionDeleteQuery<'a, C, E>
impl<'a, C, E> !UnwindSafe for SessionDeleteQuery<'a, C, 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