query

package
v0.0.0-...-99f10aa Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

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

func AllFor

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

func AllOf1

func AllOf1[V1 any](
	op1 RowOperation[V1],
) ops.AllOf1[loki.Entity, V1]

func AllOf2

func AllOf2[V1, V2 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
) ops.AllOf2[loki.Entity, V1, V2]

func AllOf3

func AllOf3[V1, V2, V3 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
	op3 RowOperation[V3],
) ops.AllOf3[loki.Entity, V1, V2, V3]

func AllOf4

func AllOf4[V1, V2, V3, V4 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
	op3 RowOperation[V3],
	op4 RowOperation[V4],
) ops.AllOf4[loki.Entity, V1, V2, V3, V4]

func AllOf5

func AllOf5[V1, V2, V3, V4, V5 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
	op3 RowOperation[V3],
	op4 RowOperation[V4],
	op5 RowOperation[V5],
) ops.AllOf5[loki.Entity, V1, V2, V3, V4, V5]

func AllOf6

func AllOf6[V1, V2, V3, V4, V5, V6 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
	op3 RowOperation[V3],
	op4 RowOperation[V4],
	op5 RowOperation[V5],
	op6 RowOperation[V6],
) ops.AllOf6[loki.Entity, V1, V2, V3, V4, V5, V6]

func AllOf7

func AllOf7[V1, V2, V3, V4, V5, V6, V7 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
	op3 RowOperation[V3],
	op4 RowOperation[V4],
	op5 RowOperation[V5],
	op6 RowOperation[V6],
	op7 RowOperation[V7],
) ops.AllOf7[loki.Entity, V1, V2, V3, V4, V5, V6, V7]

func AllOf8

func AllOf8[V1, V2, V3, V4, V5, V6, V7, V8 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
	op3 RowOperation[V3],
	op4 RowOperation[V4],
	op5 RowOperation[V5],
	op6 RowOperation[V6],
	op7 RowOperation[V7],
	op8 RowOperation[V8],
) ops.AllOf8[loki.Entity, V1, V2, V3, V4, V5, V6, V7, V8]

func AllOf9

func AllOf9[V1, V2, V3, V4, V5, V6, V7, V8, V9 any](
	op1 RowOperation[V1],
	op2 RowOperation[V2],
	op3 RowOperation[V3],
	op4 RowOperation[V4],
	op5 RowOperation[V5],
	op6 RowOperation[V6],
	op7 RowOperation[V7],
	op8 RowOperation[V8],
	op9 RowOperation[V9],
) ops.AllOf9[loki.Entity, V1, V2, V3, V4, V5, V6, V7, V8, V9]

func AnyOf1

func AnyOf1[V any](op1 RowOperation[V]) ops.AnyOf1[loki.Entity, V]

func AnyOf2

func AnyOf2[V any](op1, op2 RowOperation[V]) ops.AnyOf2[loki.Entity, V]

func AnyOf3

func AnyOf3[V any](op1, op2, op3 RowOperation[V]) ops.AnyOf3[loki.Entity, V]

func AnyOf4

func AnyOf4[V any](op1, op2, op3, op4 RowOperation[V]) ops.AnyOf4[loki.Entity, V]

func AnyOf5

func AnyOf5[V any](op1, op2, op3, op4, op5 RowOperation[V]) ops.AnyOf5[loki.Entity, V]

func AnyOf6

func AnyOf6[V any](op1, op2, op3, op4, op5, op6 RowOperation[V]) ops.AnyOf6[loki.Entity, V]

func AnyOf7

func AnyOf7[V any](op1, op2, op3, op4, op5, op6, op7 RowOperation[V]) ops.AnyOf7[loki.Entity, V]

func AnyOf8

func AnyOf8[V any](op1, op2, op3, op4, op5, op6, op7, op8 RowOperation[V]) ops.AnyOf8[loki.Entity, V]

func AnyOf9

func AnyOf9[V any](op1, op2, op3, op4, op5, op6, op7, op8, op9 RowOperation[V]) ops.AnyOf9[loki.Entity, V]

func Batch1

func Batch1[U1 ops.Unwrapper[V1], R loki.Component, V1 any](u *loki.Update, fn func(entity loki.Entity, attrs V1) (R, bool))

func Batch2

func Batch2[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], R loki.Component, V1, V2 any](u *loki.Update, fn func(entity loki.Entity, attrs Values2[V1, V2]) (R, bool))

func Batch3

func Batch3[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], R loki.Component, V1, V2, V3 any](u *loki.Update, fn func(entity loki.Entity, attrs Values3[V1, V2, V3]) (R, bool))

func Batch4

func Batch4[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], R loki.Component, V1, V2, V3, V4 any](u *loki.Update, fn func(entity loki.Entity, attrs Values4[V1, V2, V3, V4]) (R, bool))

func Batch5

func Batch5[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], R loki.Component, V1, V2, V3, V4, V5 any](u *loki.Update, fn func(entity loki.Entity, attrs Values5[V1, V2, V3, V4, V5]) (R, bool))

func Batch6

func Batch6[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], R loki.Component, V1, V2, V3, V4, V5, V6 any](u *loki.Update, fn func(entity loki.Entity, attrs Values6[V1, V2, V3, V4, V5, V6]) (R, bool))

func Batch7

func Batch7[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], R loki.Component, V1, V2, V3, V4, V5, V6, V7 any](u *loki.Update, fn func(entity loki.Entity, attrs Values7[V1, V2, V3, V4, V5, V6, V7]) (R, bool))

func Batch8

func Batch8[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], U8 ops.Unwrapper[V8], R loki.Component, V1, V2, V3, V4, V5, V6, V7, V8 any](u *loki.Update, fn func(entity loki.Entity, attrs Values8[V1, V2, V3, V4, V5, V6, V7, V8]) (R, bool))

func Batch9

func Batch9[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], U8 ops.Unwrapper[V8], U9 ops.Unwrapper[V9], R loki.Component, V1, V2, V3, V4, V5, V6, V7, V8, V9 any](u *loki.Update, fn func(entity loki.Entity, attrs Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9]) (R, bool))

func Get

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

func GroupBy

func GroupBy[K cmp.Ordered, V, U any](on Operation[V], key ops.KeyFn[V, K], merge ops.MergeFn[V, U]) ops.GroupBy[loki.Entity, K, V, U]

func Join

func Join[L, R, V any](left Operation[L], right Operation[R], join ops.JoinFn[L, R, V]) ops.Join[loki.Entity, L, R, V]

func Query

func Query[V any](op RowOperation[V]) ops.RowQuery[loki.Entity, V]

func Select

func Select[V, U any](on Operation[V], fn ops.SelectFn[V, U]) ops.Select[loki.Entity, V, U]

func SelectRow

func SelectRow[V, U any](on RowOperation[V], fn ops.SelectFn[V, U]) ops.Select[loki.Entity, RowValue[V], RowValue[U]]

Types

type AllOf

type AllOf[V any] = ops.AllOf[loki.Entity, V]

type AllSlots

type AllSlots[C loki.SlottedComponent] struct{}

func (AllSlots[C]) Compile

func (AllSlots[C]) Compile() RowOperation[[]C]

func (AllSlots[C]) Unwrap

func (AllSlots[C]) Unwrap() []C

type AnyOf

type AnyOf[V any] = ops.AnyOf[loki.Entity, V]

type Attribute

type Attribute[C loki.AttributeType] struct{}

func (Attribute[C]) Compile

func (Attribute[C]) Compile() RowOperation[C]

func (Attribute[C]) Unwrap

func (Attribute[C]) Unwrap() C

type Behavior

type Behavior[C loki.BehaviorType] struct{}

func (Behavior[C]) Compile

func (Behavior[C]) Compile() RowOperation[C]

func (Behavior[C]) Unwrap

func (Behavior[C]) Unwrap() C

type Const

type Const[V any] = ops.Const[loki.Entity, V]

type Defaulted

type Defaulted[V any] interface {
	Default() V
}

type Ephemeral

type Ephemeral[C loki.EphemeralType] struct{}

func (Ephemeral[C]) Compile

func (Ephemeral[C]) Compile() RowOperation[C]

func (Ephemeral[C]) Unwrap

func (Ephemeral[C]) Unwrap() C

type Expression

type Expression[V any] interface {
	Compile() Operation[V]
}

type Maybe

type Maybe[V any] = store.Maybe[V]

func NoneOf

func NoneOf[V any]() Maybe[V]

func SomeOf

func SomeOf[V any](v V) Maybe[V]

type Operation

type Operation[V any] = ops.Operation[loki.Entity, V]

func AsAny

func AsAny[V any](op Operation[V]) Operation[any]

type Optional

type Optional[C any] struct{ On RowOperation[C] }

func (Optional[C]) Compile

func (op Optional[C]) Compile() RowOperation[Maybe[C]]

func (Optional[C]) Unwrap

func (Optional[C]) Unwrap() Maybe[C]

type Read

type Read[V any] = ops.Read[loki.Entity, V]

type ReadAll

type ReadAll[V any] = ops.ReadAll[loki.Entity, V]

type ReadOptional

type ReadOptional[V any] = ops.ReadOptional[loki.Entity, V]

type ReadSlots

type ReadSlots[V Slotted] = ops.ReadSlots[loki.Entity, V]

type ReadWithDefault

type ReadWithDefault[V any] = ops.ReadWithDefault[loki.Entity, V]

type RowOperation

type RowOperation[V any] = ops.RowOperation[loki.Entity, V]

func Calculate1

func Calculate1[U1 ops.Unwrapper[V1], V1, R any](fn func(V1) (R, bool)) RowOperation[R]

func Calculate2

func Calculate2[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], V1, V2, R any](fn func(V1, V2) (R, bool)) RowOperation[R]

func Calculate3

func Calculate3[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], V1, V2, V3, R any](fn func(V1, V2, V3) (R, bool)) RowOperation[R]

func Calculate4

func Calculate4[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], V1, V2, V3, V4, R any](fn func(V1, V2, V3, V4) (R, bool)) RowOperation[R]

func Calculate5

func Calculate5[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], V1, V2, V3, V4, V5, R any](fn func(V1, V2, V3, V4, V5) (R, bool)) RowOperation[R]

func Calculate6

func Calculate6[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], V1, V2, V3, V4, V5, V6, R any](fn func(V1, V2, V3, V4, V5, V6) (R, bool)) RowOperation[R]

func Calculate7

func Calculate7[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], V1, V2, V3, V4, V5, V6, V7, R any](fn func(V1, V2, V3, V4, V5, V6, V7) (R, bool)) RowOperation[R]

func Calculate8

func Calculate8[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], U8 ops.Unwrapper[V8], V1, V2, V3, V4, V5, V6, V7, V8, R any](fn func(V1, V2, V3, V4, V5, V6, V7, V8) (R, bool)) RowOperation[R]

func Calculate9

func Calculate9[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], U8 ops.Unwrapper[V8], U9 ops.Unwrapper[V9], V1, V2, V3, V4, V5, V6, V7, V8, V9, R any](fn func(V1, V2, V3, V4, V5, V6, V7, V8, V9) (R, bool)) RowOperation[R]

func RowAsAny

func RowAsAny[V any](op RowOperation[V]) RowOperation[any]

type RowQuery

type RowQuery[V any] = ops.RowQuery[loki.Entity, V]

func Query1

func Query1[U1 ops.Unwrapper[V1], V1 any]() RowQuery[V1]

func Query2

func Query2[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], V1, V2 any]() RowQuery[Values2[V1, V2]]

func Query3

func Query3[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], V1, V2, V3 any]() RowQuery[Values3[V1, V2, V3]]

func Query4

func Query4[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], V1, V2, V3, V4 any]() RowQuery[Values4[V1, V2, V3, V4]]

func Query5

func Query5[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], V1, V2, V3, V4, V5 any]() RowQuery[Values5[V1, V2, V3, V4, V5]]

func Query6

func Query6[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], V1, V2, V3, V4, V5, V6 any]() RowQuery[Values6[V1, V2, V3, V4, V5, V6]]

func Query7

func Query7[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], V1, V2, V3, V4, V5, V6, V7 any]() RowQuery[Values7[V1, V2, V3, V4, V5, V6, V7]]

func Query8

func Query8[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], U8 ops.Unwrapper[V8], V1, V2, V3, V4, V5, V6, V7, V8 any]() RowQuery[Values8[V1, V2, V3, V4, V5, V6, V7, V8]]

func Query9

func Query9[U1 ops.Unwrapper[V1], U2 ops.Unwrapper[V2], U3 ops.Unwrapper[V3], U4 ops.Unwrapper[V4], U5 ops.Unwrapper[V5], U6 ops.Unwrapper[V6], U7 ops.Unwrapper[V7], U8 ops.Unwrapper[V8], U9 ops.Unwrapper[V9], V1, V2, V3, V4, V5, V6, V7, V8, V9 any]() RowQuery[Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9]]

type RowValue

type RowValue[V any] = ops.RowValue[loki.Entity, V]

type Slots

type Slots[C loki.SlottedComponent] struct{}

func (Slots[C]) Compile

func (Slots[C]) Compile() RowOperation[C]

func (Slots[C]) Unwrap

func (Slots[C]) Unwrap() C

type Slotted

type Slotted = ops.Slotted

type Unwrap

type Unwrap[C ops.Unwrapper[V], V any] struct{ Op RowOperation[C] }

func (Unwrap[C, V]) Compile

func (op Unwrap[C, V]) Compile() RowOperation[V]

type Values1

type Values1[V1 any] = ops.Values1[V1]

type Values2

type Values2[V1, V2 any] = ops.Values2[V1, V2]

type Values3

type Values3[V1, V2, V3 any] = ops.Values3[V1, V2, V3]

type Values4

type Values4[V1, V2, V3, V4 any] = ops.Values4[V1, V2, V3, V4]

type Values5

type Values5[V1, V2, V3, V4, V5 any] = ops.Values5[V1, V2, V3, V4, V5]

type Values6

type Values6[V1, V2, V3, V4, V5, V6 any] = ops.Values6[V1, V2, V3, V4, V5, V6]

type Values7

type Values7[V1, V2, V3, V4, V5, V6, V7 any] = ops.Values7[V1, V2, V3, V4, V5, V6, V7]

type Values8

type Values8[V1, V2, V3, V4, V5, V6, V7, V8 any] = ops.Values8[V1, V2, V3, V4, V5, V6, V7, V8]

type Values9

type Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9 any] = ops.Values9[V1, V2, V3, V4, V5, V6, V7, V8, V9]

type Without

type Without[C any] struct{ Op RowOperation[C] }

func (Without[C]) Compile

func (op Without[C]) Compile() RowOperation[ops.None]

func (Without[C]) Unwrap

func (Without[C]) Unwrap() ops.None

Jump to

Keyboard shortcuts

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