Skip to main content

QueryPlan

Struct QueryPlan 

Source
pub struct QueryPlan<E: SearchEntity> {
    pub meta: &'static EntityMeta,
    pub server_predicate: PredicateArena,
    pub server_group_predicate: PredicateArena,
    pub row_predicate: PredicateArena,
    pub group_predicate: PredicateArena,
    pub projection: Vec<FieldId>,
    pub projection_aliases: Option<Vec<&'static str>>,
    pub order: Vec<OrderBy>,
    pub paging: Paging,
    pub target: QueryTarget,
    pub distinct: bool,
    pub force_empty: bool,
    /* private fields */
}
Expand description

Immutable input to a backend renderer.

Fields§

§meta: &'static EntityMeta§server_predicate: PredicateArena§server_group_predicate: PredicateArena§row_predicate: PredicateArena§group_predicate: PredicateArena§projection: Vec<FieldId>§projection_aliases: Option<Vec<&'static str>>§order: Vec<OrderBy>§paging: Paging§target: QueryTarget§distinct: bool§force_empty: bool

Implementations§

Source§

impl<E: SearchEntity> QueryPlan<E>

Source

pub fn new( query: &UserQuery<E>, scope: &ServerScope<E>, target: QueryTarget, ) -> Result<Self, PlanError>

Source

pub fn new_with_scopes( query: &UserQuery<E>, scope: &ServerScope<E>, group_scope: &GroupScope<E>, target: QueryTarget, ) -> Result<Self, PlanError>

Source

pub fn condition_order_value( &self, field: FieldId, ) -> Result<Option<&ScalarValue>, ParamError>

Source

pub fn for_projection<P: SearchProjection<E>>( query: &UserQuery<E>, scope: &ServerScope<E>, ) -> Result<Self, PlanError>

Source

pub const fn shape_fingerprint_seed(&self) -> u64

Source

pub fn field_access(&self) -> &FieldAccessPolicy<E>

Source

pub fn validate_field_access( &self, fields: impl IntoIterator<Item = FieldId>, ) -> Result<(), ParamError>

Source

pub fn validate_predicate_access( &self, predicate: &PredicateArena, ) -> Result<(), ParamError>

Trait Implementations§

Source§

impl<E: Debug + SearchEntity> Debug for QueryPlan<E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.