MCPcopy
hub / github.com/ent/ent / Not

Function Not

dialect/sql/builder.go:800–806  ·  view source on GitHub ↗

Not wraps the given predicate with the not predicate. Not(Or(EQ("name", "foo"), EQ("name", "bar")))

(pred *Predicate)

Source from the content-addressed store, hash-verified

798//
799// Not(Or(EQ("name", "foo"), EQ("name", "bar")))
800func Not(pred *Predicate) *Predicate {
801 return P().Not().Append(func(b *Builder) {
802 b.Wrap(func(b *Builder) {
803 b.Join(pred)
804 })
805 })
806}
807
808// Not appends NOT to the predicate.
809func (p *Predicate) Not() *Predicate {

Callers 7

PredicatesFunction · 0.92
BackfillUserTagsFunction · 0.92
evalExprMethod · 0.92
NotPredicatesFunction · 0.70
TestBuilderFunction · 0.70
NotInMethod · 0.70
WhereMethod · 0.70

Calls 5

WrapMethod · 0.80
PFunction · 0.70
AppendMethod · 0.65
NotMethod · 0.45
JoinMethod · 0.45

Tested by 2

PredicatesFunction · 0.74
TestBuilderFunction · 0.56