pub struct IQQueryOptions {
pub start: Option<String>,
pub end: Option<String>,
pub limit: Option<u32>,
pub filter: Option<Value>,
pub projection: Option<Vec<String>>,
pub group_by: Option<String>,
}Expand description
Optional inputs for IQResource::query.
The filter is a recursive Value shaped per the IQFilterExpression
schema: each node MUST carry exactly ONE of field (leaf), and
(array of sub-expressions, all must match), or (array, any must
match), or not (single sub-expression). Mixing in a single node
returns HTTP 400.
Use the iq_leaf, iq_and, iq_or, iq_not free functions
to construct filter trees ergonomically.
Fields§
§start: Option<String>§end: Option<String>§limit: Option<u32>§filter: Option<Value>§projection: Option<Vec<String>>§group_by: Option<String>Field name to group on. Some switches the response shape from
flat {entries, ...} to grouped {groups: [{groupKey, count}], ...}.
Use "$value" for scalar states.
Implementations§
Source§impl IQQueryOptions
impl IQQueryOptions
pub fn new() -> Self
pub fn start(self, s: impl Into<String>) -> Self
pub fn end(self, s: impl Into<String>) -> Self
pub fn limit(self, n: u32) -> Self
pub fn filter(self, f: Value) -> Self
pub fn projection(self, fields: Vec<String>) -> Self
pub fn group_by(self, field: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for IQQueryOptions
impl Clone for IQQueryOptions
Source§fn clone(&self) -> IQQueryOptions
fn clone(&self) -> IQQueryOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IQQueryOptions
impl Debug for IQQueryOptions
Source§impl Default for IQQueryOptions
impl Default for IQQueryOptions
Source§fn default() -> IQQueryOptions
fn default() -> IQQueryOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IQQueryOptions
impl RefUnwindSafe for IQQueryOptions
impl Send for IQQueryOptions
impl Sync for IQQueryOptions
impl Unpin for IQQueryOptions
impl UnsafeUnpin for IQQueryOptions
impl UnwindSafe for IQQueryOptions
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