MCPcopy
hub / github.com/ent/ent / And

Function And

dialect/sql/builder.go:830–835  ·  view source on GitHub ↗

And combines all given predicates with AND between them.

(preds ...*Predicate)

Source from the content-addressed store, hash-verified

828
829// And combines all given predicates with AND between them.
830func And(preds ...*Predicate) *Predicate {
831 p := P()
832 return p.Append(func(b *Builder) {
833 p.mayWrap(preds, b, "AND")
834 })
835}
836
837// IsTrue appends a predicate that checks if the column value is truthy.
838func IsTrue(col string) *Predicate {

Callers 15

PredicatesFunction · 0.92
TestSchemaConfigFunction · 0.92
TestWritePathFunction · 0.92
tableExistMethod · 0.92
tableExistMethod · 0.92
tableExistMethod · 0.92
evalBinaryMethod · 0.92
TestHasNeighborsWithFunction · 0.92
nodeMethod · 0.92
addFKEdgesMethod · 0.92
matchIDsFunction · 0.92

Calls 3

mayWrapMethod · 0.80
PFunction · 0.70
AppendMethod · 0.65

Tested by 12

PredicatesFunction · 0.74
TestSchemaConfigFunction · 0.74
TestWritePathFunction · 0.74
TestHasNeighborsWithFunction · 0.74
TestBuilderFunction · 0.56
TestSelector_UnionFunction · 0.56
TestSelector_ExceptFunction · 0.56
TestSelector_IntersectFunction · 0.56
TestReusePredicatesFunction · 0.56
TestBoolPredicatesFunction · 0.56