pub struct Selection {
pub table_name: String,
pub fields: Vec<String>,
pub relationships: Vec<(String, QueryPlan)>,
}Expand description
Field selection
Fields§
§table_name: StringTable name
fields: Vec<String>Selected fields
relationships: Vec<(String, QueryPlan)>Nested relationships
Implementations§
Source§impl Selection
impl Selection
Sourcepub fn relationship(self, name: impl Into<String>, plan: QueryPlan) -> Self
pub fn relationship(self, name: impl Into<String>, plan: QueryPlan) -> Self
Add a relationship
Sourcepub fn table_name(&self) -> &str
pub fn table_name(&self) -> &str
Get the table name
Sourcepub fn primary_key(&self) -> &str
pub fn primary_key(&self) -> &str
Get the primary key column (assuming “id” for now)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin for Selection
impl UnwindSafe for Selection
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