FieldIn returns a raw predicate to check if the value of the field is IN the given values.
(name string, vs ...T)
| 122 | |
| 123 | // FieldIn returns a raw predicate to check if the value of the field is IN the given values. |
| 124 | func FieldIn[T any](name string, vs ...T) func(*Selector) { |
| 125 | return func(s *Selector) { |
| 126 | v := make([]any, len(vs)) |
| 127 | for i := range v { |
| 128 | v[i] = vs[i] |
| 129 | } |
| 130 | s.Where(In(s.C(name), v...)) |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // FieldNotIn returns a raw predicate to check if the value of the field is NOT IN the given values. |
| 135 | func FieldNotIn[T any](name string, vs ...T) func(*Selector) { |
searching dependent graphs…