MCPcopy
hub / github.com/ent/ent / FieldEQ

Function FieldEQ

dialect/sql/sql.go:33–37  ·  view source on GitHub ↗

FieldEQ returns a raw predicate to check if the given field equals to the given value.

(name string, v any)

Source from the content-addressed store, hash-verified

31
32// FieldEQ returns a raw predicate to check if the given field equals to the given value.
33func FieldEQ(name string, v any) func(*Selector) {
34 return func(s *Selector) {
35 s.Where(EQ(s.C(name), v))
36 }
37}
38
39// FieldsEQ returns a raw predicate to check if the given fields (columns) are equal.
40func FieldsEQ(field1, field2 string) func(*Selector) {

Callers 15

IDFunction · 0.92
IDEQFunction · 0.92
OidFunction · 0.92
OidEQFunction · 0.92
IDFunction · 0.92
IDEQFunction · 0.92
SourceFunction · 0.92
SourceURIFunction · 0.92
TextFunction · 0.92
SourceEQFunction · 0.92
SourceURIEQFunction · 0.92
TextEQFunction · 0.92

Calls 3

EQFunction · 0.70
WhereMethod · 0.65
CMethod · 0.65

Tested by 5

TestFilterTraverseFuncFunction · 0.74
TestFieldEQFunction · 0.56
TestAndPredicatesFunction · 0.56
TestOrPredicatesFunction · 0.56
TestNotPredicatesFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…