pub struct ReadPlan {
pub select: Vec<CoercibleSelectField>,
pub from: QualifiedIdentifier,
pub from_alias: Option<String>,
pub where_clauses: Vec<CoercibleLogicTree>,
pub order: Vec<CoercibleOrderTerm>,
pub range: Range,
pub rel_name: String,
pub rel_to_parent: Option<Relationship>,
pub rel_join_conds: Vec<JoinCondition>,
pub rel_join_type: Option<JoinType>,
pub rel_select: Vec<RelSelectField>,
pub depth: u32,
}Expand description
A read plan for a single table/view.
Fields§
§select: Vec<CoercibleSelectField>Columns to select
from: QualifiedIdentifierSource table
from_alias: Option<String>Table alias
where_clauses: Vec<CoercibleLogicTree>WHERE conditions
order: Vec<CoercibleOrderTerm>ORDER BY terms
range: RangePagination range
rel_name: StringRelation name (for embedding)
rel_to_parent: Option<Relationship>Relationship to parent (if embedded)
rel_join_conds: Vec<JoinCondition>Join conditions
rel_join_type: Option<JoinType>Join type
rel_select: Vec<RelSelectField>Embedded relations to select
depth: u32Nesting depth
Implementations§
Source§impl ReadPlan
impl ReadPlan
Sourcepub fn from_request(
request: &ApiRequest,
table: &Table,
schema_cache: &SchemaCache,
) -> Result<Self>
pub fn from_request( request: &ApiRequest, table: &Table, schema_cache: &SchemaCache, ) -> Result<Self>
Create a read plan from an API request.
Sourcepub fn for_mutation(
request: &ApiRequest,
table: &Table,
schema_cache: &SchemaCache,
) -> Result<Self>
pub fn for_mutation( request: &ApiRequest, table: &Table, schema_cache: &SchemaCache, ) -> Result<Self>
Create a read plan for returning mutation results.
Sourcepub fn has_pagination(&self) -> bool
pub fn has_pagination(&self) -> bool
Check if this plan has pagination.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ReadPlan
impl<'de> Deserialize<'de> for ReadPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ReadPlan
impl RefUnwindSafe for ReadPlan
impl Send for ReadPlan
impl Sync for ReadPlan
impl Unpin for ReadPlan
impl UnwindSafe for ReadPlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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