pub struct QueryArgs {
pub select: Vec<String>,
pub filter: Option<TableFilter>,
pub order_by: Vec<OrderByField>,
pub limit: Option<i64>,
pub offset: Option<i64>,
pub relations: HashMap<String, QueryArgs>,
}Expand description
Arguments for a GraphQL table query.
Fields§
§select: Vec<String>Fields to select (column names)
filter: Option<TableFilter>Filter conditions
order_by: Vec<OrderByField>Order by specifications
limit: Option<i64>Limit number of results
offset: Option<i64>Offset into results
relations: HashMap<String, QueryArgs>Nested relation queries
Implementations§
Source§impl QueryArgs
impl QueryArgs
Sourcepub fn with_select(self, fields: Vec<String>) -> Self
pub fn with_select(self, fields: Vec<String>) -> Self
Set the select fields.
Sourcepub fn with_filter(self, filter: TableFilter) -> Self
pub fn with_filter(self, filter: TableFilter) -> Self
Set the filter.
Sourcepub fn with_order_by(self, order_by: Vec<OrderByField>) -> Self
pub fn with_order_by(self, order_by: Vec<OrderByField>) -> Self
Set order by.
Sourcepub fn with_pagination(self, pagination: PaginationInput) -> Self
pub fn with_pagination(self, pagination: PaginationInput) -> Self
Set pagination.
Sourcepub fn with_limit(self, limit: i64) -> Self
pub fn with_limit(self, limit: i64) -> Self
Set limit.
Sourcepub fn with_offset(self, offset: i64) -> Self
pub fn with_offset(self, offset: i64) -> Self
Set offset.
Sourcepub fn with_relation(self, name: String, args: QueryArgs) -> Self
pub fn with_relation(self, name: String, args: QueryArgs) -> Self
Add a nested relation query.
Sourcepub fn has_select(&self) -> bool
pub fn has_select(&self) -> bool
Check if any select fields are specified.
Sourcepub fn has_filter(&self) -> bool
pub fn has_filter(&self) -> bool
Check if any filters are specified.
Sourcepub fn has_order_by(&self) -> bool
pub fn has_order_by(&self) -> bool
Check if any ordering is specified.
Sourcepub fn has_pagination(&self) -> bool
pub fn has_pagination(&self) -> bool
Check if pagination is specified.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryArgs
impl RefUnwindSafe for QueryArgs
impl Send for QueryArgs
impl Sync for QueryArgs
impl Unpin for QueryArgs
impl UnwindSafe for QueryArgs
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