MCPcopy
hub / github.com/ent/ent / Or

Function Or

entql/entql.go:147–159  ·  view source on GitHub ↗

Or returns a composed predicate that represents the logical OR predicate.

(x, y P, z ...P)

Source from the content-addressed store, hash-verified

145
146// Or returns a composed predicate that represents the logical OR predicate.
147func Or(x, y P, z ...P) P {
148 if len(z) == 0 {
149 return &BinaryExpr{
150 Op: OpOr,
151 X: x,
152 Y: y,
153 }
154 }
155 return &NaryExpr{
156 Op: OpOr,
157 Xs: append([]Expr{x, y}, p2expr(z)...),
158 }
159}
160
161// F returns a field expression for the given name.
162func F(name string) *Field {

Callers 15

TestPStringFunction · 0.92
TestGraph_EvalPFunction · 0.92
BoolOrFunction · 0.70
BytesOrFunction · 0.70
TimeOrFunction · 0.70
UintOrFunction · 0.70
Uint8OrFunction · 0.70
Uint16OrFunction · 0.70
Uint32OrFunction · 0.70
Uint64OrFunction · 0.70
IntOrFunction · 0.70
Int8OrFunction · 0.70

Calls 1

p2exprFunction · 0.85

Tested by 2

TestPStringFunction · 0.74
TestGraph_EvalPFunction · 0.74