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>
impl<E: Entity, J: Entity> DbSetQueryIncludeMany<E, J>
Sourcepub fn filter(self, predicate: Predicate) -> Self
pub fn filter(self, predicate: Predicate) -> Self
Adds a predicate after configuring the collection include.
Sourcepub fn join(self, join: Join) -> Self
pub fn join(self, join: Join) -> Self
Adds an explicit join after configuring the collection include.
Sourcepub fn inner_join<K: Entity>(self, on: Predicate) -> Self
pub fn inner_join<K: Entity>(self, on: Predicate) -> Self
Adds an explicit INNER JOIN after configuring the collection include.
Sourcepub fn left_join<K: Entity>(self, on: Predicate) -> Self
pub fn left_join<K: Entity>(self, on: Predicate) -> Self
Adds an explicit LEFT JOIN after configuring the collection include.
Sourcepub fn order_by(self, order: OrderBy) -> Self
pub fn order_by(self, order: OrderBy) -> Self
Adds an ordering expression after configuring the collection include.
Sourcepub fn join_strategy(self) -> Self
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.
Sourcepub fn split_query(self) -> Self
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.
Sourcepub fn max_joined_rows(self, limit: usize) -> Self
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.
Sourcepub fn unbounded_join(self) -> Self
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.
Sourcepub fn with_deleted(self) -> Self
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.
Sourcepub fn only_deleted(self) -> Self
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.
Sourcepub async fn all(self) -> Result<Vec<E>, OrmError>where
E: FromRow + IncludeCollection<J> + Send + SoftDeleteEntity + TenantScopedEntity,
J: FromRow + Send + SoftDeleteEntity + TenantScopedEntity,
pub async fn all(self) -> Result<Vec<E>, OrmError>where
E: FromRow + IncludeCollection<J> + Send + SoftDeleteEntity + TenantScopedEntity,
J: FromRow + Send + SoftDeleteEntity + TenantScopedEntity,
Executes the query and materializes root entities with one collection navigation attached.