MCPcopy Index your code
hub / github.com/ent/ent / LenEQ

Function LenEQ

dialect/sql/sqljson/sqljson.go:276–281  ·  view source on GitHub ↗

LenEQ return a predicate for checking that an array length of a JSON (returned by the path) is equal to the given argument. sqljson.LenEQ("a", 1, sqljson.Path("b"))

(column string, size int, opts ...Option)

Source from the content-addressed store, hash-verified

274//
275// sqljson.LenEQ("a", 1, sqljson.Path("b"))
276func LenEQ(column string, size int, opts ...Option) *sql.Predicate {
277 return sql.P(func(b *sql.Builder) {
278 lenPath(b, column, opts...)
279 b.WriteOp(sql.OpEQ).Arg(size)
280 })
281}
282
283// LenNEQ return a predicate for checking that an array length
284// of a JSON (returned by the path) is not equal to the given argument.

Callers 2

PredicatesFunction · 0.92
TestWritePathFunction · 0.92

Calls 4

PStruct · 0.92
lenPathFunction · 0.85
ArgMethod · 0.80
WriteOpMethod · 0.80

Tested by 2

PredicatesFunction · 0.74
TestWritePathFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…