Skip to main content

JoinedValuesPlan

Struct JoinedValuesPlan 

Source
pub struct JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>
where L: MapQuery<Key = LK, Value = LV>, R: MapQuery<Key = RK, Value = RV>, LK: Hash + Eq + CellValue, LV: CellValue, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, OV: CellValue, FL: Fn(&LK, &LV) -> JK + Send + Sync + 'static, FR: RightJoinKey<RK, RV, JK>, F: Fn(&LK, &LV, &[(RK, RV)]) -> OV + Send + Sync + 'static,
{ /* private fields */ }
Expand description

A left join whose output is projected directly from the indexed matches.

Implementations§

Source§

impl<L, R1, LK, LV, RK1, RV1, JK1, MV, FL1, FR1, FM1> JoinedValuesPlan<L, R1, LK, LV, RK1, RV1, JK1, MV, FL1, FR1, FM1>
where L: MapQuery<Key = LK, Value = LV> + PreservesMapKey<LK>, R1: MapQuery<Key = RK1, Value = RV1>, LK: Hash + Eq + CellValue, LV: CellValue, RK1: Hash + Eq + CellValue, RV1: CellValue, JK1: Hash + Eq + CellValue, MV: CellValue, FL1: Fn(&LK, &LV) -> JK1 + Send + Sync + 'static, FR1: RightJoinKey<RK1, RV1, JK1>, FM1: Fn(&LK, &LV, &[(RK1, RV1)]) -> MV + Send + Sync + 'static,

Source

pub fn left_join_by<R2, RK2, RV2, JK2, FL2, FR2>( self, right: R2, left_key: FL2, right_key: FR2, ) -> TwoLeftJoinPlan<L, R1, R2, LK, LV, RK1, RV1, JK1, MV, RK2, RV2, JK2, FL1, FR1, DirectJoinProjection<FM1>, FL2, RequiredRightKey<FR2>>
where R2: MapQuery<Key = RK2, Value = RV2>, RK2: Hash + Eq + CellValue, RV2: CellValue, JK2: Hash + Eq + CellValue, FL2: Fn(&LK, &MV) -> JK2 + Send + Sync + 'static, FR2: Fn(&RK2, &RV2) -> JK2 + Send + Sync + 'static,

Extend a direct joined projection with a coordinated second left join.

Trait Implementations§

Source§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> MapQuery for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>
where L: MapQuery<Key = LK, Value = LV>, R: MapQuery<Key = RK, Value = RV>, LK: Hash + Eq + CellValue, LV: CellValue, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, OV: CellValue, FL: Fn(&LK, &LV) -> JK + Send + Sync + 'static, FR: RightJoinKey<RK, RV, JK>, F: Fn(&LK, &LV, &[(RK, RV)]) -> OV + Send + Sync + 'static,

Source§

type Key = LK

Key produced by this query plan.
Source§

type Value = OV

Value produced by this query plan.
Source§

fn materialize(self) -> CellMap<Self::Key, Self::Value, CellImmutable>

Compile the query into a CellMap and install root subscriptions running the statically typed incremental runtime. Read more

Auto Trait Implementations§

§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> Freeze for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>
where F: Freeze, L: Freeze, R: Freeze, FL: Freeze, FR: Freeze,

§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> RefUnwindSafe for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>

§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> Send for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>

§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> Sync for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>

§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> Unpin for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>
where F: Unpin, L: Unpin, R: Unpin, FL: Unpin, FR: Unpin,

§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> UnsafeUnpin for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>

§

impl<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F> UnwindSafe for JoinedValuesPlan<L, R, LK, LV, RK, RV, JK, OV, FL, FR, F>

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<K, V, M> CountByExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn count_by<GK, F>(self, group_key: F) -> impl MapQuery<Key = GK, Value = usize>
where GK: Hash + Eq + CellValue, F: Fn(&K, &V) -> GK + Send + Sync + 'static,

Groups rows by group_key(&source_key, &source_value) and stores how many rows are in each group. Read more
Source§

impl<K, V, M> FlatMapEntriesExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn flat_map_entries<LK, V2, F>( self, f: F, ) -> impl MapQuery<Key = (K, LK), Value = V2>
where LK: Hash + Eq + CellValue, V2: CellValue, F: Fn(&K, &V) -> Vec<(LK, V2)> + Send + Sync + 'static,

Expand each source row into locally keyed rows. The output identity is (source_key, local_key), preventing collisions between source rows. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<K, V, M> GroupByExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn group_by<GK, F>( self, group_key: F, ) -> impl MapQuery<Key = GK, Value = Vec<V>>
where K: Ord, GK: Hash + Eq + CellValue, F: Fn(&K, &V) -> GK + Send + Sync + 'static,

Groups source rows by group_key(&source_key, &source_value). Read more
Source§

impl<K, V, M> InnerJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn inner_join<R, RV>(self, right: R) -> impl MapQuery<Key = K, Value = (V, RV)>
where R: MapQuery<Key = K, Value = RV>, RV: CellValue,

Inner join on equal map keys. Read more
Source§

fn inner_join_fk<Rel, R>( self, right: R, ) -> RelationPlan<InnerJoinByPairPlan<Self, R, K, V, R::Key, Rel::Child, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, OptionalRightKey<impl Fn(&R::Key, &Rel::Child) -> Option<K> + Send + Sync + 'static>>, Rel>
where Rel: ForeignKeyRelation, R: MapQuery<Value = Rel::Child>, Rel::ForeignKey: IdFor<Rel::Parent, MapKey = K>,

Inner join using foreign key relationship. Read more
Source§

fn inner_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_key: FL, right_key: FR, ) -> impl MapQuery<Key = (K, RK), Value = (V, RV)>
where R: MapQuery<Key = RK, Value = RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> JK + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Inner join using explicit key extractors. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<K, V, M> LeftJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn left_join<R, RV>( self, right: R, ) -> LeftJoinPlan<Self, R, K, V, K, RV, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, RequiredRightKey<impl Fn(&K, &RV) -> K + Send + Sync + 'static>>
where R: MapQuery<Key = K, Value = RV>, RV: CellValue,

Left join on equal map keys. Read more
Source§

fn left_join_fk<Rel, R>( self, right: R, ) -> RelationPlan<LeftJoinPlan<Self, R, K, V, R::Key, Rel::Child, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, OptionalRightKey<impl Fn(&R::Key, &Rel::Child) -> Option<K> + Send + Sync + 'static>>, Rel>
where Rel: ForeignKeyRelation, R: MapQuery<Value = Rel::Child>, Rel::ForeignKey: IdFor<Rel::Parent, MapKey = K>,

Left join using foreign key relationship. Read more
Source§

fn left_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_key: FL, right_key: FR, ) -> LeftJoinPlan<Self, R, K, V, RK, RV, JK, FL, RequiredRightKey<FR>>
where R: MapQuery<Key = RK, Value = RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> JK + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Left join using explicit key extractors. Read more
Source§

impl<K, V, M> LeftSemiJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn left_semi_join<R, RV>(self, right: R) -> impl MapQuery<Key = K, Value = V>
where R: MapQuery<Key = K, Value = RV>, RV: CellValue,

Left semi join on equal map keys. Read more
Source§

fn left_semi_join_fk<Rel, R>( self, right: R, ) -> RelationPlan<LeftSemiJoinPlan<Self, R, K, V, R::Key, Rel::Child, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, OptionalRightKey<impl Fn(&R::Key, &Rel::Child) -> Option<K> + Send + Sync + 'static>>, Rel>
where Rel: ForeignKeyRelation, R: MapQuery<Value = Rel::Child>, Rel::ForeignKey: IdFor<Rel::Parent, MapKey = K>,

Left semi join using foreign key relationship. Read more
Source§

fn left_semi_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_key: FL, right_key: FR, ) -> impl MapQuery<Key = K, Value = V>
where R: MapQuery<Key = RK, Value = RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> JK + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Left semi join using explicit key extractors. Read more
Source§

impl<K, V, M> MapEntriesExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn map_entries<K2, V2, F>(self, f: F) -> impl MapQuery<Key = K2, Value = V2>
where K2: Hash + Eq + CellValue, V2: CellValue, F: Fn(&K, &V) -> (K2, V2) + Send + Sync + 'static,

Map every input row to exactly one output row with a unique output key. Read more
Source§

fn filter_map_entries<K2, V2, F>( self, f: F, ) -> impl MapQuery<Key = K2, Value = V2>
where K2: Hash + Eq + CellValue, V2: CellValue, F: Fn(&K, &V) -> Option<(K2, V2)> + Send + Sync + 'static,

Map an input row to zero or one output row with a unique output key. Read more
Source§

impl<K, V, Q> MapQueryShareExt<K, V> for Q
where K: CellValue + Hash + Eq, V: CellValue, Q: MapQuery<Key = K, Value = V>,

Source§

fn share(self) -> SharedMapQuery<K, V>

Convert this map query into a Clone-able multicast handle.
Source§

impl<K, V, M> MapValuesExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn map_values<U, F>(self, f: F) -> MapValuesPlan<Self, K, V, U, F>
where U: CellValue, F: Fn(&K, &V) -> U + Send + Sync + 'static,

Map every value while retaining its input key.
Source§

fn filter_map_values<U, F>(self, f: F) -> FilterMapValuesPlan<Self, K, V, U, F>
where U: CellValue, F: Fn(&K, &V) -> Option<U> + Send + Sync + 'static,

Map or omit a value while retaining its input key.
Source§

impl<K, V, M> MultiLeftJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn multi_left_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_keys: FL, right_key: FR, ) -> impl MapQuery<Key = K, Value = (V, Vec<RV>)>
where R: MapQuery<Key = RK, Value = RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> Vec<JK> + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Left join where each left item maps to multiple join keys. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<K, V, M> ProjectCellExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn project_cell<K2, V2, W, F>( self, mapper: F, ) -> impl MapQuery<Key = K2, Value = V2>
where K2: Hash + Eq + CellValue, V2: CellValue, W: Watchable<Option<(K2, V2)>> + Gettable<Option<(K2, V2)>> + Clone + Send + Sync + 'static, F: Fn(&K, &V) -> W + Send + Sync + 'static,

Reactive project variant: each row maps to a watchable optional output row. Read more
Source§

impl<K, V, M> SelectCellExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn select_cell<W, F>(self, predicate: F) -> impl MapQuery<Key = K, Value = V>
where W: Pipeline<bool> + PipelineSeed<bool> + Gettable<bool> + Clone + Send + Sync + 'static, F: Fn(&K, &V) -> W + Send + Sync + 'static,

Reactive filter: each row has a watchable boolean gate. Read more
Source§

impl<K, V, M> SelectExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<Key = K, Value = V>,

Source§

fn select<F>( self, predicate: F, ) -> SelectPlan<Self, K, V, impl Fn(&K, &V) -> bool + Send + Sync + 'static>
where F: Fn(&V) -> bool + Send + Sync + 'static,

Filters rows by value. Read more
Source§

fn select_by<F>(self, predicate: F) -> SelectPlan<Self, K, V, F>
where F: Fn(&K, &V) -> bool + Send + Sync + 'static,

Filters rows using both the key and value.
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.