pub struct FindMany {
pub model: String,
pub where_clauses: Vec<Where>,
pub limit: Option<usize>,
pub offset: Option<usize>,
pub sort_by: Option<Sort>,
pub select: Vec<String>,
pub joins: IndexMap<String, JoinOption>,
}Expand description
Find-many query contract for adapters.
Fields§
§model: String§where_clauses: Vec<Where>§limit: Option<usize>§offset: Option<usize>§sort_by: Option<Sort>§select: Vec<String>§joins: IndexMap<String, JoinOption>Implementations§
Source§impl FindMany
impl FindMany
pub fn new(model: impl Into<String>) -> Self
pub fn where_clause(self, where_clause: Where) -> Self
pub fn limit(self, limit: usize) -> Self
pub fn offset(self, offset: usize) -> Self
pub fn sort_by(self, sort: Sort) -> Self
pub fn select<const N: usize>(self, fields: [&str; N]) -> Self
pub fn join(self, model: impl Into<String>, option: JoinOption) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FindMany
impl<'de> Deserialize<'de> for FindMany
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 FindMany
Auto Trait Implementations§
impl Freeze for FindMany
impl RefUnwindSafe for FindMany
impl Send for FindMany
impl Sync for FindMany
impl Unpin for FindMany
impl UnsafeUnpin for FindMany
impl UnwindSafe for FindMany
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