pub struct Query<E: EntityKind> { /* private fields */ }Implementations§
Source§impl<E: EntityKind> Query<E>
impl<E: EntityKind> Query<E>
Sourcepub const fn new(consistency: MissingRowPolicy) -> Self
pub const fn new(consistency: MissingRowPolicy) -> Self
Create a new intent with an explicit missing-row policy. Ignore favors idempotency and may mask index/data divergence on deletes. Use Error to surface missing rows during scan/delete execution.
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.
Sourcepub fn group_by(self, field: impl AsRef<str>) -> Result<Self, QueryError>
pub fn group_by(self, field: impl AsRef<str>) -> Result<Self, QueryError>
Add one GROUP BY field.
Sourcepub fn aggregate(self, aggregate: AggregateExpr) -> Self
pub fn aggregate(self, aggregate: AggregateExpr) -> Self
Add one aggregate terminal via composable aggregate expression.
Sourcepub fn grouped_limits(self, max_groups: u64, max_group_bytes: u64) -> Self
pub fn grouped_limits(self, max_groups: u64, max_group_bytes: u64) -> Self
Override grouped hard limits for grouped execution budget enforcement.
Sourcepub fn having_group(
self,
field: impl AsRef<str>,
op: CompareOp,
value: Value,
) -> Result<Self, QueryError>
pub fn having_group( self, field: impl AsRef<str>, op: CompareOp, value: Value, ) -> Result<Self, QueryError>
Add one grouped HAVING compare clause over one grouped key field.
Sourcepub fn having_aggregate(
self,
aggregate_index: usize,
op: CompareOp,
value: Value,
) -> Result<Self, QueryError>
pub fn having_aggregate( self, aggregate_index: usize, op: CompareOp, value: Value, ) -> Result<Self, QueryError>
Add one grouped HAVING compare clause over one grouped aggregate output.
Sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
Apply a limit to the current mode.
Load limits bound result size; delete limits bound mutation size.
For scalar load queries, any use of limit or offset requires an
explicit order_by(...) so pagination is deterministic.
GROUP BY queries use canonical grouped-key order by default.
Sourcepub fn offset(self, offset: u32) -> Self
pub fn offset(self, offset: u32) -> Self
Apply an offset to a load intent.
Scalar pagination requires an explicit order_by(...).
GROUP BY queries use canonical grouped-key order by default.
Sourcepub fn explain(&self) -> Result<ExplainPlan, QueryError>
pub fn explain(&self) -> Result<ExplainPlan, QueryError>
Explain this intent without executing it.
Sourcepub fn planned(&self) -> Result<PlannedQuery<E>, QueryError>
pub fn planned(&self) -> Result<PlannedQuery<E>, QueryError>
Plan this intent into a neutral planned query contract.
Sourcepub fn plan(&self) -> Result<CompiledQuery<E>, QueryError>
pub fn plan(&self) -> Result<CompiledQuery<E>, QueryError>
Compile this intent into query-owned handoff state.
This boundary intentionally does not expose executor runtime shape.