pub struct SessionLoadQuery<'a, C: CanisterKind, E: EntityKind<Canister = C>> { /* private fields */ }Expand description
SessionLoadQuery
Session-bound load query wrapper.
Owns intent construction and execution routing only.
All result inspection and projection is performed on Response<E>.
Implementations§
Source§impl<'a, C: CanisterKind, E: EntityKind<Canister = C>> SessionLoadQuery<'a, C, E>
impl<'a, C: CanisterKind, E: EntityKind<Canister = C>> SessionLoadQuery<'a, C, E>
pub const fn query(&self) -> &Query<E>
pub fn by_key(self, key: E::PrimaryKey) -> Self
pub fn many<I>(self, keys: I) -> Selfwhere
I: IntoIterator<Item = E::PrimaryKey>,
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 offset(self, offset: 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>
pub fn execute(&self) -> Result<Response<E>, QueryError>
Execute this query using the session’s policy settings.
Sourcepub fn is_empty(&self) -> Result<bool, QueryError>
pub fn is_empty(&self) -> Result<bool, QueryError>
Execute and return whether the result set is empty.
Sourcepub fn count(&self) -> Result<u32, QueryError>
pub fn count(&self) -> Result<u32, QueryError>
Execute and return the number of matching rows.
Sourcepub fn require_one(&self) -> Result<(), QueryError>
pub fn require_one(&self) -> Result<(), QueryError>
Execute and require exactly one matching row.
Sourcepub fn require_some(&self) -> Result<(), QueryError>
pub fn require_some(&self) -> Result<(), QueryError>
Execute and require at least one matching row.
Source§impl<C: CanisterKind, E: EntityKind<Canister = C>> SessionLoadQuery<'_, C, E>where
E::PrimaryKey: UnitKey,
impl<C: CanisterKind, E: EntityKind<Canister = C>> SessionLoadQuery<'_, C, E>where
E::PrimaryKey: UnitKey,
Auto Trait Implementations§
impl<'a, C, E> Freeze for SessionLoadQuery<'a, C, E>
impl<'a, C, E> !RefUnwindSafe for SessionLoadQuery<'a, C, E>
impl<'a, C, E> !Send for SessionLoadQuery<'a, C, E>
impl<'a, C, E> !Sync for SessionLoadQuery<'a, C, E>
impl<'a, C, E> Unpin for SessionLoadQuery<'a, C, E>where
E: Unpin,
impl<'a, C, E> !UnwindSafe for SessionLoadQuery<'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