pub struct SessionLoadQuery<'a, C: CanisterKind, E: EntityKind<Canister = C>> { /* private fields */ }Expand description
SessionLoadQuery
Fluent, session-bound load query wrapper that keeps intent pure
while routing execution through the DbSession boundary.
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 fn key(self, key: Key) -> Self
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 order_by_desc(self, field: &'static str) -> Self
pub fn order_by_desc(self, field: &'static str) -> Self
Append a descending sort key.
Sourcepub fn explain(&self) -> Result<ExplainPlan, QueryError>
pub fn explain(&self) -> Result<ExplainPlan, QueryError>
Explain this query without executing it.
Sourcepub fn plan(&self) -> Result<ExecutablePlan<E>, QueryError>
pub fn plan(&self) -> Result<ExecutablePlan<E>, QueryError>
Plan this query into an executor-ready plan.
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 all(&self) -> Result<Vec<E>, QueryError>
pub fn all(&self) -> Result<Vec<E>, QueryError>
Execute a load query and return all entities.
Sourcepub fn one(&self) -> Result<E, QueryError>
pub fn one(&self) -> Result<E, QueryError>
Execute a load query and require exactly one entity.
Sourcepub fn one_opt(&self) -> Result<Option<E>, QueryError>
pub fn one_opt(&self) -> Result<Option<E>, QueryError>
Execute a load query and return zero or one entity.
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> UnsafeUnpin for SessionLoadQuery<'a, C, E>
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