pub enum LazyLoadStrategy {
Select,
Joined,
Subquery,
Selectin,
Dynamic,
NoLoad,
RaiseOnSql,
WriteOnly,
}Expand description
Lazy loading strategy for relationships.
Controls how and when related objects are loaded from the database. Maps to SQLAlchemy’s relationship lazy parameter.
Variants§
Select
Load items on first access via separate SELECT (default).
Joined
Eager load via JOIN in parent query.
Subquery
Eager load via separate SELECT using IN clause.
Selectin
Eager load via subquery correlated to parent.
Dynamic
Return a query object instead of loading items (for large collections).
NoLoad
Never load - access raises error (useful for write-only relationships).
RaiseOnSql
Always raise error on access (strict write-only).
WriteOnly
Write-only collection (append/remove only, no iteration).
Trait Implementations§
Source§impl Clone for LazyLoadStrategy
impl Clone for LazyLoadStrategy
Source§fn clone(&self) -> LazyLoadStrategy
fn clone(&self) -> LazyLoadStrategy
Returns a duplicate of the value. Read more
1.0.0 · 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 LazyLoadStrategy
impl Debug for LazyLoadStrategy
Source§impl Default for LazyLoadStrategy
impl Default for LazyLoadStrategy
Source§fn default() -> LazyLoadStrategy
fn default() -> LazyLoadStrategy
Returns the “default value” for a type. Read more
Source§impl PartialEq for LazyLoadStrategy
impl PartialEq for LazyLoadStrategy
impl Copy for LazyLoadStrategy
impl Eq for LazyLoadStrategy
impl StructuralPartialEq for LazyLoadStrategy
Auto Trait Implementations§
impl Freeze for LazyLoadStrategy
impl RefUnwindSafe for LazyLoadStrategy
impl Send for LazyLoadStrategy
impl Sync for LazyLoadStrategy
impl Unpin for LazyLoadStrategy
impl UnwindSafe for LazyLoadStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).