pub struct Query {
pub filters: Vec<Filter>,
pub sorts: Vec<Sort>,
pub pagination: Option<Pagination>,
pub keyset: Option<KeysetPagination>,
pub window: Option<QueryWindow>,
pub window_token: Option<WindowToken>,
pub wire_format: WireFormatProfile,
pub preloads: Vec<String>,
}Fields§
§filters: Vec<Filter>§sorts: Vec<Sort>§pagination: Option<Pagination>§keyset: Option<KeysetPagination>§window: Option<QueryWindow>§window_token: Option<WindowToken>§wire_format: WireFormatProfile§preloads: Vec<String>Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
pub fn where_filter(self, filter: Filter) -> Self
pub fn order_by( self, field: impl Into<String>, direction: SortDirection, ) -> Self
pub fn paginate(self, page: usize, per_page: usize) -> Self
pub fn keyset_paginate(self, limit: usize) -> Self
pub fn keyset_after( self, field: impl Into<String>, value: Value, limit: usize, ) -> Self
pub fn keyset_before( self, field: impl Into<String>, value: Value, limit: usize, ) -> Self
pub fn window(self, start: usize, end: usize, overscan: usize) -> Self
pub fn with_window_token(self, token: WindowToken) -> Self
pub fn wire_format(self, profile: WireFormatProfile) -> Self
pub fn preload(self, relation: impl Into<String>) -> Self
pub fn fingerprint(&self) -> String
pub fn next_window_token( &self, offset: usize, limit: usize, issued_at_ms: u64, nonce: u64, ) -> WindowToken
pub fn has_valid_window_token(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Query
impl<'de> Deserialize<'de> for Query
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
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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