Documentation ¶
Overview ¶
Package etlutil contains basic iter utils.
Index ¶
- func GroupByFunc[T, V any](fn func(T) V) dagg.GroupFn[T]
- func GroupByFuncE[T, V any](fn func(T) (V, error)) dagg.GroupFn[T]
- func Reduce[Ta, T any](name string, fn func(Ta, T) Ta, ffn ...func(Ta) any) dagg.OptFn[T]
- type Field
- type Iter
- func Group[T any](it Iter, gfn dagg.GroupFn[T], opts ...dagg.OptFn[T]) Iter
- func InnerJoin[L, R any](it1, it2 Iter, fn joinOnFunc[L, R]) Iter
- func LeftJoin[L, R any](it1, it2 Iter, fn joinOnFunc[L, R]) Iter
- func OuterJoin[L, R any](it1, it2 Iter, fn joinOnFunc[L, R]) Iter
- func RightJoin[L, R any](it1, it2 Iter, fn joinOnFunc[L, R]) Iter
- func Slice[T any](it Iter, n int) Iter
- func Tee(it Iter, fn func(it Iter)) Iter
- func Unslice[T any](it Iter) Iter
- type JoinData
- type Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupByFunc ¶
GroupByFunc accepts a func that will group iterations.
func GroupByFuncE ¶
GroupByFuncE accepts a function that expects a V type to group iterations and allows an error to be returned.
Types ¶
type Iter ¶
Iter is a iter.Iter
func LeftJoin ¶
LeftJoin loads it2 into memory and calls fn on each element of it1 and it2. If the fn returns true it will produce a JoinData[L,R] with the left value and optionaly right value
func OuterJoin ¶
OuterJoin loads it2 into memory and check each element of it1 and it2 produces JoinData[L,R] with the left and right value.
func RightJoin ¶
RightJoin loads it1 into memory and calls fn on each element of it1 and it2, if the fn returns true it will produce a JoinData[L,R] with the right value and the left value.