pub struct FindUniqueArgs {
pub where_: Expr,
pub select: HashMap<String, bool>,
pub include: HashMap<String, IncludeRelation>,
}Expand description
Fields§
§where_: ExprWHERE filter expression (required — must reference a unique/PK field).
select: HashMap<String, bool>Projection: only return the specified fields.
If empty, all columns are returned. When specified, PK columns are
always included regardless. Cannot be used together with include.
include: HashMap<String, IncludeRelation>Relations to eager-load for the matching record.
Cannot be used together with select.
Implementations§
Source§impl FindUniqueArgs
impl FindUniqueArgs
Sourcepub fn with_include(
self,
relation: impl Into<String>,
include: IncludeRelation,
) -> Self
pub fn with_include( self, relation: impl Into<String>, include: IncludeRelation, ) -> Self
Add a relation include.
Sourcepub fn with_select(self, field: impl Into<String>) -> Self
pub fn with_select(self, field: impl Into<String>) -> Self
Select a scalar field.
Trait Implementations§
Source§impl Clone for FindUniqueArgs
impl Clone for FindUniqueArgs
Source§fn clone(&self) -> FindUniqueArgs
fn clone(&self) -> FindUniqueArgs
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 moreAuto Trait Implementations§
impl Freeze for FindUniqueArgs
impl RefUnwindSafe for FindUniqueArgs
impl Send for FindUniqueArgs
impl Sync for FindUniqueArgs
impl Unpin for FindUniqueArgs
impl UnsafeUnpin for FindUniqueArgs
impl UnwindSafe for FindUniqueArgs
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