MCPcopy
hub / github.com/ent/ent / BoolAnd

Function BoolAnd

entql/types.go:85–95  ·  view source on GitHub ↗

BoolAnd returns a composed predicate that represents the logical AND predicate.

(x, y BoolP, z ...BoolP)

Source from the content-addressed store, hash-verified

83
84// BoolAnd returns a composed predicate that represents the logical AND predicate.
85func BoolAnd(x, y BoolP, z ...BoolP) BoolP {
86 expr := &boolP{}
87 expr.done = func(name string) {
88 zs := make([]P, len(z))
89 for i := range z {
90 zs[i] = z[i].Field(name)
91 }
92 expr.P = And(x.Field(name), y.Field(name), zs...)
93 }
94 return expr
95}
96
97// BoolNot returns a predicate that represents the logical negation of the given predicate.
98func BoolNot(x BoolP) BoolP {

Callers

nothing calls this directly

Calls 2

AndFunction · 0.70
FieldMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…