Skip to main content

ExistenceTarget

Trait ExistenceTarget 

Source
pub trait ExistenceTarget<S, A, EA, FA, Sc: Score>
where EA: CollectionExtract<S, Item = A>, FA: UniFilter<S, A>,
{ type Output; // Required method fn apply( self, mode: ExistenceMode, extractor_a: EA, filter_a: FA, ) -> Self::Output; }
Expand description

Right-hand side of if_exists and if_not_exists.

Required Associated Types§

Source

type Output

The existence stream produced.

Required Methods§

Source

fn apply( self, mode: ExistenceMode, extractor_a: EA, filter_a: FA, ) -> Self::Output

Builds the existence stream from the left stream’s extractor and filter.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S, A, B, EA, FA, EB, FB, K, KA, KB, Mode, Sc> ExistenceTarget<S, A, EA, FA, Sc> for (UniConstraintStream<S, B, EB, FB, Sc>, EqualJoiner<KA, KB, K, Mode>)
where S: Send + Sync + 'static, A: Send + Sync + 'static, B: Send + Sync + 'static, EA: CollectionExtract<S, Item = A> + Send + Sync + 'static, FA: UniFilter<S, A> + Send + Sync + 'static, EB: CollectionExtract<S, Item = B> + Send + Sync + 'static, FB: UniFilter<S, B> + Send + Sync + 'static, K: Eq + Hash + Clone + Send + Sync + 'static, KA: Fn(&A) -> K + Send + Sync + 'static, KB: Fn(&B) -> K + Send + Sync + 'static, Sc: Score + 'static,

Direct existence: .if_exists((other_stream, equal_bi(ka, kb))).

Both inputs are collections over their streams, so each input’s membership is that stream’s accumulated filter, and the relationship keys off the leaf views.

Source§

type Output = ExistsConstraintStream<S, A, K, CollectionNode<S, UniConstraintStream<S, A, EA, FA, Sc>>, CollectionNode<S, UniConstraintStream<S, B, EB, FB, Sc>>, EntityKey<KA>, UnitKeys<EntityKey<KB>>, Sc>

Source§

fn apply( self, mode: ExistenceMode, extractor_a: EA, filter_a: FA, ) -> Self::Output

Source§

impl<S, A, P, B, EA, FA, EP, FP, K, KA, KB, Mode, Flatten, Sc> ExistenceTarget<S, A, EA, FA, Sc> for (FlattenedCollectionTarget<S, P, B, EP, FP, Flatten, Sc>, EqualJoiner<KA, KB, K, Mode>)
where S: Send + Sync + 'static, A: Send + Sync + 'static, P: Clone + Send + Sync + 'static, B: Send + Sync + 'static, EA: CollectionExtract<S, Item = A> + Send + Sync + 'static, FA: UniFilter<S, A> + Send + Sync + 'static, EP: CollectionExtract<S, Item = P> + Send + Sync + 'static, FP: UniFilter<S, P> + Send + Sync + 'static, K: Eq + Hash + Clone + Send + Sync + 'static, KA: Fn(&A) -> K + Send + Sync + 'static, KB: Fn(&B) -> K + Send + Sync + 'static, Flatten: FlattenExtract<P, Item = B> + Send + Sync + 'static, Sc: Score + 'static,

Flattened existence: .if_not_exists((stream.flattened(|p| ..), equal_bi(..))).

The right input is the parent collection; the key adapter expands each parent’s children in place from the solution, so no child rows are created.

Source§

type Output = ExistsConstraintStream<S, A, K, CollectionNode<S, UniConstraintStream<S, A, EA, FA, Sc>>, CollectionNode<S, UniConstraintStream<S, P, EP, FP, Sc>>, EntityKey<KA>, ParentChildKeys<KB, Flatten>, Sc>

Source§

fn apply( self, mode: ExistenceMode, extractor_a: EA, filter_a: FA, ) -> Self::Output

Implementors§