pub struct Query {
pub model: String,
pub select: Vec<String>,
pub where_: IndexMap<String, Value>,
pub filters: Vec<Vec<String>>,
pub page: Option<usize>,
pub per_page: Option<usize>,
pub sort: Option<Sort>,
pub method: Option<String>,
}Fields§
§model: String§select: Vec<String>§where_: IndexMap<String, Value>§filters: Vec<Vec<String>>§page: Option<usize>§per_page: Option<usize>§sort: Option<Sort>§method: Option<String>Implementations§
Source§impl Query
impl Query
pub fn new(model: impl Into<String>) -> Self
pub fn select(self, fields: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn filter_layout<I, J, S>(self, rows: I) -> Self
pub fn where_eq(self, field: impl Into<String>, value: JsonValue) -> Self
pub fn page(self, page: usize, per_page: usize) -> Self
pub fn sort_by(self, field: impl Into<String>, ascending: bool) -> Self
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