MCPcopy
hub / github.com/ent/ent / LenGT

Function LenGT

dialect/sql/sqljson/sqljson.go:299–304  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

297//
298// sqljson.LenGT("a", 1, sqljson.Path("b"))
299func LenGT(column string, size int, opts ...Option) *sql.Predicate {
300 return sql.P(func(b *sql.Builder) {
301 lenPath(b, column, opts...)
302 b.WriteOp(sql.OpGT).Arg(size)
303 })
304}
305
306// LenGTE return a predicate for checking that an array length
307// of a JSON (returned by the path) is greater than or equal to

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…