MCPcopy
hub / github.com/ent/ent / LenGTE

Function LenGTE

dialect/sql/sqljson/sqljson.go:311–316  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

309//
310// sqljson.LenGTE("a", 1, sqljson.Path("b"))
311func LenGTE(column string, size int, opts ...Option) *sql.Predicate {
312 return sql.P(func(b *sql.Builder) {
313 lenPath(b, column, opts...)
314 b.WriteOp(sql.OpGTE).Arg(size)
315 })
316}
317
318// LenLT return a predicate for checking that an array length
319// of a JSON (returned by the path) is less than the given

Callers 1

TestWritePathFunction · 0.92

Calls 4

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

Tested by 1

TestWritePathFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…