pub struct QueryPlan { /* private fields */ }Expand description
Language-neutral executable query plan.
Implementations§
Source§impl QueryPlan
impl QueryPlan
Sourcepub fn new(operation: QueryOperation, resource: impl Into<String>) -> Self
pub fn new(operation: QueryOperation, resource: impl Into<String>) -> Self
Starts a plan for operation over the canonical resource name.
Sourcepub fn add_projection(&mut self, field: impl Into<String>)
pub fn add_projection(&mut self, field: impl Into<String>)
Appends a canonical field to the response projection.
Sourcepub fn set_filter(&mut self, filter: QueryFilter)
pub fn set_filter(&mut self, filter: QueryFilter)
Replaces the boolean filter.
Sourcepub fn add_order(&mut self, order: QueryOrder)
pub fn add_order(&mut self, order: QueryOrder)
Appends an ordering entry.
Sourcepub const fn set_pagination(&mut self, limit: Option<u64>, offset: Option<u64>)
pub const fn set_pagination(&mut self, limit: Option<u64>, offset: Option<u64>)
Sets result pagination.
Sourcepub fn add_group_by(&mut self, field: impl Into<String>)
pub fn add_group_by(&mut self, field: impl Into<String>)
Appends a canonical grouping field.
Sourcepub fn add_aggregate(&mut self, aggregate: QueryAggregate)
pub fn add_aggregate(&mut self, aggregate: QueryAggregate)
Appends an aggregate projection.
Sourcepub fn set_mutation_value(
&mut self,
field: impl Into<String>,
value: QueryValue,
)
pub fn set_mutation_value( &mut self, field: impl Into<String>, value: QueryValue, )
Sets a canonical mutation assignment.
Sourcepub fn add_source_evidence(&mut self, evidence: QuerySourceEvidence)
pub fn add_source_evidence(&mut self, evidence: QuerySourceEvidence)
Attaches source evidence to the plan.
Sourcepub const fn operation(&self) -> QueryOperation
pub const fn operation(&self) -> QueryOperation
Operation.
Sourcepub fn projection(&self) -> &[String]
pub fn projection(&self) -> &[String]
Canonical projected fields in response order.
Sourcepub const fn filter(&self) -> Option<&QueryFilter>
pub const fn filter(&self) -> Option<&QueryFilter>
Boolean filter.
Sourcepub fn order(&self) -> &[QueryOrder]
pub fn order(&self) -> &[QueryOrder]
Ordering entries.
Sourcepub fn aggregates(&self) -> &[QueryAggregate]
pub fn aggregates(&self) -> &[QueryAggregate]
Aggregate projections.
Sourcepub const fn mutation(&self) -> &BTreeMap<String, QueryValue>
pub const fn mutation(&self) -> &BTreeMap<String, QueryValue>
Canonical mutation assignments.
Sourcepub fn source_evidence(&self) -> &[QuerySourceEvidence]
pub fn source_evidence(&self) -> &[QuerySourceEvidence]
Source ranges retained by the frontend adapter.
Lowering validates meaning but never authorizes execution.
Sourcepub fn canonical_value(&self) -> Value
pub fn canonical_value(&self) -> Value
Returns the provenance-free canonical JSON value used to compare plans produced by different query languages.
Sourcepub fn canonical_json(&self) -> String
pub fn canonical_json(&self) -> String
Deterministic provenance-free serialization for cross-frontend conformance checks.
Trait Implementations§
impl StructuralPartialEq for QueryPlan
Auto Trait Implementations§
impl Freeze for QueryPlan
impl RefUnwindSafe for QueryPlan
impl Send for QueryPlan
impl Sync for QueryPlan
impl Unpin for QueryPlan
impl UnsafeUnpin for QueryPlan
impl UnwindSafe for QueryPlan
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more