Skip to main content

DbSetQueryIncludeMany

Struct DbSetQueryIncludeMany 

Source
pub struct DbSetQueryIncludeMany<E: Entity, J: Entity> { /* private fields */ }
Expand description

Query builder returned by DbSetQuery::include_many::<T>(...) for a collection navigation.

Implementations§

Source§

impl<E: Entity, J: Entity> DbSetQueryIncludeMany<E, J>

Source

pub fn filter(self, predicate: Predicate) -> Self

Adds a predicate after configuring the collection include.

Source

pub fn join(self, join: Join) -> Self

Adds an explicit join after configuring the collection include.

Source

pub fn inner_join<K: Entity>(self, on: Predicate) -> Self

Adds an explicit INNER JOIN after configuring the collection include.

Source

pub fn left_join<K: Entity>(self, on: Predicate) -> Self

Adds an explicit LEFT JOIN after configuring the collection include.

Source

pub fn order_by(self, order: OrderBy) -> Self

Adds an ordering expression after configuring the collection include.

Source

pub fn join_strategy(self) -> Self

Uses the join-based collection loading strategy.

This is the default strategy. The row limit protects callers from accidentally loading an unbounded cartesian result through one join.

Source

pub fn split_query(self) -> Self

Selects the planned split-query loading strategy.

Execution currently returns a clear error because split queries need a separate implementation that loads roots first and related rows second.

Source

pub fn max_joined_rows(self, limit: usize) -> Self

Overrides the maximum number of joined rows accepted before grouping.

Use this only when the expected root/collection cardinality is known.

Source

pub fn unbounded_join(self) -> Self

Removes the join row safety limit.

This keeps the API explicit for callers that intentionally accept a large join result.

Source

pub fn with_deleted(self) -> Self

Includes logically deleted root rows for entities with soft_delete.

This affects only the root entity E; included collection entities still apply their own default soft_delete visibility inside the join.

Source

pub fn only_deleted(self) -> Self

Returns only logically deleted root rows for entities with soft_delete.

This affects only the root entity E; included collection entities still apply their own default soft_delete visibility inside the join.

Source

pub async fn all(self) -> Result<Vec<E>, OrmError>

Executes the query and materializes root entities with one collection navigation attached.

Auto Trait Implementations§

§

impl<E, J> Freeze for DbSetQueryIncludeMany<E, J>

§

impl<E, J> !RefUnwindSafe for DbSetQueryIncludeMany<E, J>

§

impl<E, J> Send for DbSetQueryIncludeMany<E, J>

§

impl<E, J> Sync for DbSetQueryIncludeMany<E, J>

§

impl<E, J> Unpin for DbSetQueryIncludeMany<E, J>

§

impl<E, J> UnsafeUnpin for DbSetQueryIncludeMany<E, J>

§

impl<E, J> !UnwindSafe for DbSetQueryIncludeMany<E, J>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more