ops

package
v0.0.0-...-557e180 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All[R Row, V any](s store.Store[R], op RowOperation[R, V]) iter.Seq2[R, V]

func AllFor

func AllFor[R Row, V any](s store.Store[R], row R, op RowOperation[R, V]) iter.Seq[V]

func Get

func Get[R Row, V any](s store.Store[R], row R, op RowOperation[R, V]) (V, bool)

func NextBatch

func NextBatch[V any](it store.Iterator[V], buf []V) int

Types

type AllOf

type AllOf[R Row, V any] []RowOperation[R, V]

func (AllOf[R, V]) Execute

func (op AllOf[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, []V]]

type AllOf1

type AllOf1[R Row, V1 any] struct {
	Op1 RowOperation[R, V1]
}

func (AllOf1[R, V1]) Execute

func (op AllOf1[R, V1]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values1[V1]]]

type AllOf2

type AllOf2[R Row, V1, V2 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
}

func (AllOf2[R, V1, V2]) Execute

func (op AllOf2[R, V1, V2]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values2[V1, V2]]]

type AllOf3

type AllOf3[R Row, V1, V2, V3 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
	Op3 RowOperation[R, V3]
}

func (AllOf3[R, V1, V2, V3]) Execute

func (op AllOf3[R, V1, V2, V3]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values3[V1, V2, V3]]]

type AllOf4

type AllOf4[R Row, V1, V2, V3, V4 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
	Op3 RowOperation[R, V3]
	Op4 RowOperation[R, V4]
}

func (AllOf4[R, V1, V2, V3, V4]) Execute

func (op AllOf4[R, V1, V2, V3, V4]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values4[V1, V2, V3, V4]]]

type AllOf5

type AllOf5[R Row, V1, V2, V3, V4, V5 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
	Op3 RowOperation[R, V3]
	Op4 RowOperation[R, V4]
	Op5 RowOperation[R, V5]
}

func (AllOf5[R, V1, V2, V3, V4, V5]) Execute

func (op AllOf5[R, V1, V2, V3, V4, V5]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values5[V1, V2, V3, V4, V5]]]

type AllOf6

type AllOf6[R Row, V1, V2, V3, V4, V5, V6 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
	Op3 RowOperation[R, V3]
	Op4 RowOperation[R, V4]
	Op5 RowOperation[R, V5]
	Op6 RowOperation[R, V6]
}

func (AllOf6[R, V1, V2, V3, V4, V5, V6]) Execute

func (op AllOf6[R, V1, V2, V3, V4, V5, V6]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values6[V1, V2, V3, V4, V5, V6]]]

type AllOf7

type AllOf7[R Row, V1, V2, V3, V4, V5, V6, V7 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
	Op3 RowOperation[R, V3]
	Op4 RowOperation[R, V4]
	Op5 RowOperation[R, V5]
	Op6 RowOperation[R, V6]
	Op7 RowOperation[R, V7]
}

func (AllOf7[R, V1, V2, V3, V4, V5, V6, V7]) Execute

func (op AllOf7[R, V1, V2, V3, V4, V5, V6, V7]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values7[V1, V2, V3, V4, V5, V6, V7]]]

type AllOf8

type AllOf8[R Row, V1, V2, V3, V4, V5, V6, V7, V8 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
	Op3 RowOperation[R, V3]
	Op4 RowOperation[R, V4]
	Op5 RowOperation[R, V5]
	Op6 RowOperation[R, V6]
	Op7 RowOperation[R, V7]
	Op8 RowOperation[R, V8]
}

func (AllOf8[R, V1, V2, V3, V4, V5, V6, V7, V8]) Execute

func (op AllOf8[R, V1, V2, V3, V4, V5, V6, V7, V8]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values8[V1, V2, V3, V4, V5, V6, V7, V8]]]

type AllOf9

type AllOf9[R Row, V1, V2, V3, V4, V5, V6, V7, V8, V9 any] struct {
	Op1 RowOperation[R, V1]
	Op2 RowOperation[R, V2]
	Op3 RowOperation[R, V3]
	Op4 RowOperation[R, V4]
	Op5 RowOperation[R, V5]
	Op6 RowOperation[R, V6]
	Op7 RowOperation[R, V7]
	Op8 RowOperation[R, V8]
	Op9 RowOperation[R, V9]
}

func (AllOf9[R, V1, V2, V3, V4, V5, V6, V7, V8, V9]) Execute

func (op AllOf9[R, V1, V2, V3, V4, V5, V6, V7, V8, V9]) Execute(s store.Store[R]) store.Iterator[RowValue[R, Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9]]]

type AnyOf

type AnyOf[R Row, V any] []RowOperation[R, V]

func (AnyOf[R, V]) Execute

func (op AnyOf[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf1

type AnyOf1[R Row, V any] [1]RowOperation[R, V]

func (AnyOf1[R, V]) Execute

func (op AnyOf1[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf2

type AnyOf2[R Row, V any] [2]RowOperation[R, V]

func (AnyOf2[R, V]) Execute

func (op AnyOf2[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf3

type AnyOf3[R Row, V any] [3]RowOperation[R, V]

func (AnyOf3[R, V]) Execute

func (op AnyOf3[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf4

type AnyOf4[R Row, V any] [4]RowOperation[R, V]

func (AnyOf4[R, V]) Execute

func (op AnyOf4[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf5

type AnyOf5[R Row, V any] [5]RowOperation[R, V]

func (AnyOf5[R, V]) Execute

func (op AnyOf5[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf6

type AnyOf6[R Row, V any] [6]RowOperation[R, V]

func (AnyOf6[R, V]) Execute

func (op AnyOf6[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf7

type AnyOf7[R Row, V any] [7]RowOperation[R, V]

func (AnyOf7[R, V]) Execute

func (op AnyOf7[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf8

type AnyOf8[R Row, V any] [8]RowOperation[R, V]

func (AnyOf8[R, V]) Execute

func (op AnyOf8[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOf9

type AnyOf9[R Row, V any] [9]RowOperation[R, V]

func (AnyOf9[R, V]) Execute

func (op AnyOf9[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type AnyOp

type AnyOp[R Row, V any] struct {
	Op Operation[R, V]
}

func (AnyOp[R, V]) Execute

func (op AnyOp[R, V]) Execute(s store.Store[R]) store.Iterator[any]

type AnyRowOp

type AnyRowOp[R Row, V any] struct {
	Op RowOperation[R, V]
}

func (AnyRowOp[R, V]) Execute

func (op AnyRowOp[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, any]]

type Const

type Const[R Row, V any] struct {
	Value V
}

func (Const[R, V]) Execute

func (op Const[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type GroupBy

type GroupBy[R Row, K cmp.Ordered, V, U any] struct {
	Key   KeyFn[V, K]
	Merge MergeFn[V, U]
	On    Operation[R, V]
}

func (GroupBy[R, K, V, U]) Execute

func (o GroupBy[R, K, V, U]) Execute(s store.Store[R]) store.Iterator[RowValue[K, U]]

type Join

type Join[S Row, L, R, V any] struct {
	Left  Operation[S, L]
	Right Operation[S, R]
	Join  JoinFn[L, R, V]
}

func (Join[S, L, R, V]) Execute

func (o Join[S, L, R, V]) Execute(s store.Store[S]) store.Iterator[V]

type JoinFn

type JoinFn[L, R, V any] func(left L, right R) (V, bool)

type KeyFn

type KeyFn[V any, K any] func(value V) K

type MergeFn

type MergeFn[V any, U any] func(agg U, value V) U

type None

type None = struct{}

type Operation

type Operation[R Row, V any] interface {
	Execute(store.Store[R]) store.Iterator[V]
}

type Read

type Read[R Row, V any] struct {
	Slot int
}

func (Read[R, V]) Execute

func (o Read[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type ReadAll

type ReadAll[R Row, V any] struct{}

func (ReadAll[R, V]) Execute

func (o ReadAll[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type ReadAllExecutor

type ReadAllExecutor[R Row, V any] interface {
	ExecuteReadAll(s store.Store[R], op ReadAll[R, V]) (store.Iterator[RowValue[R, V]], bool)
}

type ReadExecutor

type ReadExecutor[R Row, V any] interface {
	ExecuteRead(s store.Store[R], op Read[R, V]) (store.Iterator[RowValue[R, V]], bool)
}

type ReadOptional

type ReadOptional[R Row, V any] struct {
	Slot int
}

func (ReadOptional[R, V]) Execute

func (o ReadOptional[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, store.Maybe[V]]]

type ReadOptionalExecutor

type ReadOptionalExecutor[R Row, V any] interface {
	ExecuteReadOptional(s store.Store[R], op ReadOptional[R, V]) (store.Iterator[RowValue[R, store.Maybe[V]]], bool)
}

type ReadSlots

type ReadSlots[R Row, V Slotted] struct{}

func (ReadSlots[R, V]) Execute

func (o ReadSlots[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type ReadSlotsExecutor

type ReadSlotsExecutor[R Row, V Slotted] interface {
	ExecuteReadSlots(s store.Store[R], op ReadSlots[R, V]) (store.Iterator[RowValue[R, V]], bool)
}

type ReadWithDefault

type ReadWithDefault[R Row, V any] struct {
	Slot    int
	Default V
}

func (ReadWithDefault[R, V]) Execute

func (o ReadWithDefault[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, V]]

type ReadWithDefaultExecutor

type ReadWithDefaultExecutor[R Row, V any] interface {
	ExecuteReadWithDefault(s store.Store[R], op ReadWithDefault[R, V]) (store.Iterator[RowValue[R, V]], bool)
}

type Row

type Row = store.Row

type RowOperation

type RowOperation[R Row, V any] = Operation[R, RowValue[R, V]]

type RowQuery

type RowQuery[R Row, V any] struct {
	Op RowOperation[R, V]
}

func Query

func Query[R Row, V any](op RowOperation[R, V]) RowQuery[R, V]

func (RowQuery[R, V]) All

func (q RowQuery[R, V]) All(s store.Store[R]) iter.Seq2[R, V]

func (RowQuery[R, V]) AllFor

func (q RowQuery[R, V]) AllFor(s store.Store[R], row R) iter.Seq[V]

func (RowQuery[R, V]) Get

func (q RowQuery[R, V]) Get(s store.Store[R], row R) (V, bool)

type RowValue

type RowValue[R, V any] struct {
	Row   R
	Value V
}

type Select

type Select[R Row, V, U any] struct {
	Select SelectFn[V, U]
	On     Operation[R, V]
}

func (Select[R, V, U]) Execute

func (o Select[R, V, U]) Execute(s store.Store[R]) store.Iterator[U]

type SelectFn

type SelectFn[V, U any] func(value V) (U, bool)

type Slotted

type Slotted interface {
	GetSlot() int
}

type Unwrap

type Unwrap[R Row, V Unwrapper[U], U any] struct {
	Op RowOperation[R, V]
}

func (Unwrap[R, V, U]) Execute

func (op Unwrap[R, V, U]) Execute(s store.Store[R]) store.Iterator[RowValue[R, U]]

type Unwrapper

type Unwrapper[V any] interface {
	Unwrap() V
}

type Values1

type Values1[V1 any] struct {
	V1 V1
}

func (*Values1[V1]) Unwrap

func (v *Values1[V1]) Unwrap() V1

type Values2

type Values2[V1, V2 any] struct {
	V1 V1
	V2 V2
}

func (*Values2[V1, V2]) Unwrap

func (v *Values2[V1, V2]) Unwrap() (V1, V2)

type Values3

type Values3[V1, V2, V3 any] struct {
	V1 V1
	V2 V2
	V3 V3
}

func (*Values3[V1, V2, V3]) Unwrap

func (v *Values3[V1, V2, V3]) Unwrap() (V1, V2, V3)

type Values4

type Values4[V1, V2, V3, V4 any] struct {
	V1 V1
	V2 V2
	V3 V3
	V4 V4
}

func (*Values4[V1, V2, V3, V4]) Unwrap

func (v *Values4[V1, V2, V3, V4]) Unwrap() (V1, V2, V3, V4)

type Values5

type Values5[V1, V2, V3, V4, V5 any] struct {
	V1 V1
	V2 V2
	V3 V3
	V4 V4
	V5 V5
}

func (*Values5[V1, V2, V3, V4, V5]) Unwrap

func (v *Values5[V1, V2, V3, V4, V5]) Unwrap() (V1, V2, V3, V4, V5)

type Values6

type Values6[V1, V2, V3, V4, V5, V6 any] struct {
	V1 V1
	V2 V2
	V3 V3
	V4 V4
	V5 V5
	V6 V6
}

func (*Values6[V1, V2, V3, V4, V5, V6]) Unwrap

func (v *Values6[V1, V2, V3, V4, V5, V6]) Unwrap() (V1, V2, V3, V4, V5, V6)

type Values7

type Values7[V1, V2, V3, V4, V5, V6, V7 any] struct {
	V1 V1
	V2 V2
	V3 V3
	V4 V4
	V5 V5
	V6 V6
	V7 V7
}

func (*Values7[V1, V2, V3, V4, V5, V6, V7]) Unwrap

func (v *Values7[V1, V2, V3, V4, V5, V6, V7]) Unwrap() (V1, V2, V3, V4, V5, V6, V7)

type Values8

type Values8[V1, V2, V3, V4, V5, V6, V7, V8 any] struct {
	V1 V1
	V2 V2
	V3 V3
	V4 V4
	V5 V5
	V6 V6
	V7 V7
	V8 V8
}

func (*Values8[V1, V2, V3, V4, V5, V6, V7, V8]) Unwrap

func (v *Values8[V1, V2, V3, V4, V5, V6, V7, V8]) Unwrap() (V1, V2, V3, V4, V5, V6, V7, V8)

type Values9

type Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9 any] struct {
	V1 V1
	V2 V2
	V3 V3
	V4 V4
	V5 V5
	V6 V6
	V7 V7
	V8 V8
	V9 V9
}

func (*Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9]) Unwrap

func (v *Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9]) Unwrap() (V1, V2, V3, V4, V5, V6, V7, V8, V9)

type Without

type Without[R Row, V any] struct {
	Source RowOperation[R, V]
}

func (Without[R, V]) Execute

func (o Without[R, V]) Execute(s store.Store[R]) store.Iterator[RowValue[R, None]]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL