Skip to main content

SessionDeleteQuery

Struct SessionDeleteQuery 

Source
pub struct SessionDeleteQuery<'a, C: CanisterKind, E: EntityKind<Canister = C>> { /* private fields */ }
Expand description

SessionDeleteQuery

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, C: CanisterKind, E: EntityKind<Canister = C>> SessionDeleteQuery<'a, C, E>

Source

pub const fn query(&self) -> &Query<E>

Source

pub fn by_key(self, key: impl Into<Key>) -> Self

Source

pub fn many<I>(self, keys: I) -> Self
where I: IntoIterator<Item = E::PrimaryKey>,

Source

pub fn filter(self, predicate: Predicate) -> Self

Source

pub fn filter_expr(self, expr: FilterExpr) -> Result<Self, QueryError>

Source

pub fn sort_expr(self, expr: SortExpr) -> Result<Self, QueryError>

Source

pub fn order_by(self, field: impl AsRef<str>) -> Self

Source

pub fn order_by_desc(self, field: impl AsRef<str>) -> Self

Source

pub fn limit(self, limit: u32) -> Self

Source

pub fn explain(&self) -> Result<ExplainPlan, QueryError>

Source

pub fn plan(&self) -> Result<ExecutablePlan<E>, QueryError>

Source

pub fn execute(&self) -> Result<Response<E>, QueryError>

Execute this delete using the session’s policy settings.

All result inspection and projection is performed on Response<E>.

Source

pub fn is_empty(&self) -> Result<bool, QueryError>

Execute and return whether any rows were affected.

Source

pub fn count(&self) -> Result<u32, QueryError>

Execute and return the number of affected rows.

Source

pub fn require_one(&self) -> Result<(), QueryError>

Execute and require exactly one affected row.

Source

pub fn require_some(&self) -> Result<(), QueryError>

Execute and require at least one affected row.

Source§

impl<C: CanisterKind, E: EntityKind<Canister = C>> SessionDeleteQuery<'_, C, E>
where E::PrimaryKey: UnitKey,

Source

pub fn only(self) -> Self

Delete the singleton entity identified by the unit primary key ().

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> !UnwindSafe for SessionDeleteQuery<'a, C, E>

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<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V