Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyPredicateProtoSize = (&persistencespb.Predicate{ PredicateType: enums.PREDICATE_TYPE_EMPTY, Attributes: &persistencespb.Predicate_EmptyPredicateAttributes{ EmptyPredicateAttributes: &persistencespb.EmptyPredicateAttributes{}, }, }).Size()
Functions ¶
This section is empty.
Types ¶
type AndImpl ¶
type OrImpl ¶
type Predicate ¶
type Predicate[T any] interface { // Test checks if the given entity statisfy the predicate or not Test(T) bool // Equals recursively checks if the given Predicate has the same // structure and value as the caller Predicate // NOTE: the result will contain false negatives, meaning even if // two predicates are mathmatically equivalent, Equals may still // return false. Equals(Predicate[T]) bool // Size gets the estimated size in bytes of this predicate. // Implementation may keep this estimate rough and mostly account for elements that may take up considerable // space such as strings and slices. Size() int }
type UniversalImpl ¶ added in v1.17.3
type UniversalImpl[T any] struct{}
func (*UniversalImpl[T]) Equals ¶ added in v1.17.3
func (a *UniversalImpl[T]) Equals( predicate Predicate[T], ) bool
func (*UniversalImpl[T]) Size ¶ added in v1.26.0
func (*UniversalImpl[T]) Size() int
func (*UniversalImpl[T]) Test ¶ added in v1.17.3
func (a *UniversalImpl[T]) Test(t T) bool
Click to show internal directories.
Click to hide internal directories.