Documentation ¶
Overview ¶
Package entql provides an experimental API for interacting dynamically with ent queries. For more info, search for it in https://entgo.io.
Index ¶
- type BinaryExpr
- type BoolP
- type BytesP
- type CallExpr
- type Edge
- type Expr
- type Field
- type Fielder
- type Float32P
- func Float32And(x, y Float32P, z ...Float32P) Float32P
- func Float32EQ(v float32) Float32P
- func Float32GT(v float32) Float32P
- func Float32GTE(v float32) Float32P
- func Float32LT(v float32) Float32P
- func Float32LTE(v float32) Float32P
- func Float32NEQ(v float32) Float32P
- func Float32Nil() Float32P
- func Float32Not(x Float32P) Float32P
- func Float32NotNil() Float32P
- func Float32Or(x, y Float32P, z ...Float32P) Float32P
- type Float64P
- func Float64And(x, y Float64P, z ...Float64P) Float64P
- func Float64EQ(v float64) Float64P
- func Float64GT(v float64) Float64P
- func Float64GTE(v float64) Float64P
- func Float64LT(v float64) Float64P
- func Float64LTE(v float64) Float64P
- func Float64NEQ(v float64) Float64P
- func Float64Nil() Float64P
- func Float64Not(x Float64P) Float64P
- func Float64NotNil() Float64P
- func Float64Or(x, y Float64P, z ...Float64P) Float64P
- type Func
- type Int16P
- func Int16And(x, y Int16P, z ...Int16P) Int16P
- func Int16EQ(v int16) Int16P
- func Int16GT(v int16) Int16P
- func Int16GTE(v int16) Int16P
- func Int16LT(v int16) Int16P
- func Int16LTE(v int16) Int16P
- func Int16NEQ(v int16) Int16P
- func Int16Nil() Int16P
- func Int16Not(x Int16P) Int16P
- func Int16NotNil() Int16P
- func Int16Or(x, y Int16P, z ...Int16P) Int16P
- type Int32P
- func Int32And(x, y Int32P, z ...Int32P) Int32P
- func Int32EQ(v int32) Int32P
- func Int32GT(v int32) Int32P
- func Int32GTE(v int32) Int32P
- func Int32LT(v int32) Int32P
- func Int32LTE(v int32) Int32P
- func Int32NEQ(v int32) Int32P
- func Int32Nil() Int32P
- func Int32Not(x Int32P) Int32P
- func Int32NotNil() Int32P
- func Int32Or(x, y Int32P, z ...Int32P) Int32P
- type Int64P
- func Int64And(x, y Int64P, z ...Int64P) Int64P
- func Int64EQ(v int64) Int64P
- func Int64GT(v int64) Int64P
- func Int64GTE(v int64) Int64P
- func Int64LT(v int64) Int64P
- func Int64LTE(v int64) Int64P
- func Int64NEQ(v int64) Int64P
- func Int64Nil() Int64P
- func Int64Not(x Int64P) Int64P
- func Int64NotNil() Int64P
- func Int64Or(x, y Int64P, z ...Int64P) Int64P
- type Int8P
- func Int8And(x, y Int8P, z ...Int8P) Int8P
- func Int8EQ(v int8) Int8P
- func Int8GT(v int8) Int8P
- func Int8GTE(v int8) Int8P
- func Int8LT(v int8) Int8P
- func Int8LTE(v int8) Int8P
- func Int8NEQ(v int8) Int8P
- func Int8Nil() Int8P
- func Int8Not(x Int8P) Int8P
- func Int8NotNil() Int8P
- func Int8Or(x, y Int8P, z ...Int8P) Int8P
- type IntP
- type NaryExpr
- type Op
- type OtherP
- type P
- func And(x, y P, z ...P) P
- func EQ(x, y Expr) P
- func FieldContains(name, substr string) P
- func FieldContainsFold(name, substr string) P
- func FieldEQ(name string, v any) P
- func FieldEqualFold(name, v string) P
- func FieldGT(name string, v any) P
- func FieldGTE(name string, v any) P
- func FieldHasPrefix(name, prefix string) P
- func FieldHasSuffix(name, suffix string) P
- func FieldIn(name string, vs ...any) P
- func FieldLT(name string, v any) P
- func FieldLTE(name string, v any) P
- func FieldNEQ(name string, v any) P
- func FieldNil(name string) P
- func FieldNotIn(name string, vs ...any) P
- func FieldNotNil(name string) P
- func GT(x, y Expr) P
- func GTE(x, y Expr) P
- func HasEdge(name string) P
- func HasEdgeWith(name string, p ...P) P
- func LT(x, y Expr) P
- func LTE(x, y Expr) P
- func NEQ(x, y Expr) P
- func Not(x P) P
- func Or(x, y P, z ...P) P
- type StringP
- func StringAnd(x, y StringP, z ...StringP) StringP
- func StringEQ(v string) StringP
- func StringGT(v string) StringP
- func StringGTE(v string) StringP
- func StringLT(v string) StringP
- func StringLTE(v string) StringP
- func StringNEQ(v string) StringP
- func StringNil() StringP
- func StringNot(x StringP) StringP
- func StringNotNil() StringP
- func StringOr(x, y StringP, z ...StringP) StringP
- type TimeP
- func TimeAnd(x, y TimeP, z ...TimeP) TimeP
- func TimeEQ(v time.Time) TimeP
- func TimeGT(v time.Time) TimeP
- func TimeGTE(v time.Time) TimeP
- func TimeLT(v time.Time) TimeP
- func TimeLTE(v time.Time) TimeP
- func TimeNEQ(v time.Time) TimeP
- func TimeNil() TimeP
- func TimeNot(x TimeP) TimeP
- func TimeNotNil() TimeP
- func TimeOr(x, y TimeP, z ...TimeP) TimeP
- type Uint16P
- func Uint16And(x, y Uint16P, z ...Uint16P) Uint16P
- func Uint16EQ(v uint16) Uint16P
- func Uint16GT(v uint16) Uint16P
- func Uint16GTE(v uint16) Uint16P
- func Uint16LT(v uint16) Uint16P
- func Uint16LTE(v uint16) Uint16P
- func Uint16NEQ(v uint16) Uint16P
- func Uint16Nil() Uint16P
- func Uint16Not(x Uint16P) Uint16P
- func Uint16NotNil() Uint16P
- func Uint16Or(x, y Uint16P, z ...Uint16P) Uint16P
- type Uint32P
- func Uint32And(x, y Uint32P, z ...Uint32P) Uint32P
- func Uint32EQ(v uint32) Uint32P
- func Uint32GT(v uint32) Uint32P
- func Uint32GTE(v uint32) Uint32P
- func Uint32LT(v uint32) Uint32P
- func Uint32LTE(v uint32) Uint32P
- func Uint32NEQ(v uint32) Uint32P
- func Uint32Nil() Uint32P
- func Uint32Not(x Uint32P) Uint32P
- func Uint32NotNil() Uint32P
- func Uint32Or(x, y Uint32P, z ...Uint32P) Uint32P
- type Uint64P
- func Uint64And(x, y Uint64P, z ...Uint64P) Uint64P
- func Uint64EQ(v uint64) Uint64P
- func Uint64GT(v uint64) Uint64P
- func Uint64GTE(v uint64) Uint64P
- func Uint64LT(v uint64) Uint64P
- func Uint64LTE(v uint64) Uint64P
- func Uint64NEQ(v uint64) Uint64P
- func Uint64Nil() Uint64P
- func Uint64Not(x Uint64P) Uint64P
- func Uint64NotNil() Uint64P
- func Uint64Or(x, y Uint64P, z ...Uint64P) Uint64P
- type Uint8P
- func Uint8And(x, y Uint8P, z ...Uint8P) Uint8P
- func Uint8EQ(v uint8) Uint8P
- func Uint8GT(v uint8) Uint8P
- func Uint8GTE(v uint8) Uint8P
- func Uint8LT(v uint8) Uint8P
- func Uint8LTE(v uint8) Uint8P
- func Uint8NEQ(v uint8) Uint8P
- func Uint8Nil() Uint8P
- func Uint8Not(x Uint8P) Uint8P
- func Uint8NotNil() Uint8P
- func Uint8Or(x, y Uint8P, z ...Uint8P) Uint8P
- type UintP
- func UintAnd(x, y UintP, z ...UintP) UintP
- func UintEQ(v uint) UintP
- func UintGT(v uint) UintP
- func UintGTE(v uint) UintP
- func UintLT(v uint) UintP
- func UintLTE(v uint) UintP
- func UintNEQ(v uint) UintP
- func UintNil() UintP
- func UintNot(x UintP) UintP
- func UintNotNil() UintP
- func UintOr(x, y UintP, z ...UintP) UintP
- type UnaryExpr
- type Value
- type ValueP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryExpr ¶
A BinaryExpr represents a binary expression.
func (*BinaryExpr) String ¶
func (e *BinaryExpr) String() string
String returns the text representation of a binary expression.
type BoolP ¶
type BoolP interface { Fielder // contains filtered or unexported methods }
BoolP is the interface for predicates of type bool (`type P[bool]`).
type BytesP ¶
type BytesP interface { Fielder // contains filtered or unexported methods }
BytesP is the interface for predicates of type []byte (`type P[[]byte]`).
type Fielder ¶
Fielder is the interface for creating a predicate (entql.P) by a field name from the different builder types below.
type Float32P ¶
type Float32P interface { Fielder // contains filtered or unexported methods }
Float32P is the interface for predicates of type float32 (`type P[float32]`).
func Float32And ¶
Float32And returns a composed predicate that represents the logical AND predicate.
func Float32GTE ¶
Float32GTE applies the GTE operation on the given value.
func Float32LTE ¶
Float32LTE applies the LTE operation on the given value.
func Float32NEQ ¶
Float32NEQ applies the NEQ operation on the given value.
func Float32Not ¶
Float32Not returns a predicate that represents the logical negation of the given predicate.
type Float64P ¶
type Float64P interface { Fielder // contains filtered or unexported methods }
Float64P is the interface for predicates of type float64 (`type P[float64]`).
func Float64And ¶
Float64And returns a composed predicate that represents the logical AND predicate.
func Float64GTE ¶
Float64GTE applies the GTE operation on the given value.
func Float64LTE ¶
Float64LTE applies the LTE operation on the given value.
func Float64NEQ ¶
Float64NEQ applies the NEQ operation on the given value.
func Float64Not ¶
Float64Not returns a predicate that represents the logical negation of the given predicate.
type Func ¶
type Func string
A Func represents a function expression.
const ( FuncEqualFold Func = "equal_fold" // equals case-insensitive FuncContains Func = "contains" // containing FuncContainsFold Func = "contains_fold" // containing case-insensitive FuncHasPrefix Func = "has_prefix" // startingWith FuncHasSuffix Func = "has_suffix" // endingWith FuncHasEdge Func = "has_edge" // HasEdge )
Builtin functions.
type Int16P ¶
type Int16P interface { Fielder // contains filtered or unexported methods }
Int16P is the interface for predicates of type int16 (`type P[int16]`).
type Int32P ¶
type Int32P interface { Fielder // contains filtered or unexported methods }
Int32P is the interface for predicates of type int32 (`type P[int32]`).
type Int64P ¶
type Int64P interface { Fielder // contains filtered or unexported methods }
Int64P is the interface for predicates of type int64 (`type P[int64]`).
type Int8P ¶
type Int8P interface { Fielder // contains filtered or unexported methods }
Int8P is the interface for predicates of type int8 (`type P[int8]`).
type IntP ¶
type IntP interface { Fielder // contains filtered or unexported methods }
IntP is the interface for predicates of type int (`type P[int]`).
type Op ¶
type Op int
An Op represents a predicate operator.
type OtherP ¶
type OtherP interface { Fielder // contains filtered or unexported methods }
OtherP is the interface for predicates of type other (`type P[other]`).
type P ¶
P represents an expression that returns a boolean value depending on its variables.
func FieldContains ¶
FieldContains returns a predicate to check if the field value contains a substr.
func FieldContainsFold ¶
FieldContainsFold returns a predicate to check if the field value contains a substr under case-folding.
func FieldEqualFold ¶
FieldEqualFold returns a predicate to check if the field is equal to the given string under case-folding.
func FieldHasPrefix ¶
FieldHasPrefix returns a predicate to check if the field starts with the given prefix.
func FieldHasSuffix ¶
FieldHasSuffix returns a predicate to check if the field ends with the given suffix.
func FieldIn ¶
FieldIn returns a predicate to check if the field value matches any value in the given list.
func FieldNEQ ¶
FieldNEQ returns a predicate to check if a field is not equivalent to a given value.
func FieldNotIn ¶
FieldNotIn returns a predicate to check if the field value doesn't match any value in the given list.
func FieldNotNil ¶
FieldNotNil returns a predicate to check if a field is not nil (not null in databases).
func HasEdgeWith ¶
HasEdgeWith returns a predicate to check if the "other nodes" that are connected to the edge returns true on the provided predicate.
type StringP ¶
type StringP interface { Fielder // contains filtered or unexported methods }
StringP is the interface for predicates of type string (`type P[string]`).
type TimeP ¶
type TimeP interface { Fielder // contains filtered or unexported methods }
TimeP is the interface for predicates of type time.Time (`type P[time.Time]`).
type Uint16P ¶
type Uint16P interface { Fielder // contains filtered or unexported methods }
Uint16P is the interface for predicates of type uint16 (`type P[uint16]`).
type Uint32P ¶
type Uint32P interface { Fielder // contains filtered or unexported methods }
Uint32P is the interface for predicates of type uint32 (`type P[uint32]`).
type Uint64P ¶
type Uint64P interface { Fielder // contains filtered or unexported methods }
Uint64P is the interface for predicates of type uint64 (`type P[uint64]`).
type Uint8P ¶
type Uint8P interface { Fielder // contains filtered or unexported methods }
Uint8P is the interface for predicates of type uint8 (`type P[uint8]`).
type UintP ¶
type UintP interface { Fielder // contains filtered or unexported methods }
UintP is the interface for predicates of type uint (`type P[uint]`).
type ValueP ¶
type ValueP interface { Fielder // contains filtered or unexported methods }
ValueP is the interface for predicates of type [16]byte (`type P[[16]byte]`).