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

Function LenLTE

dialect/sql/sqljson/sqljson.go:335–340  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

333//
334// sqljson.LenLTE("a", 1, sqljson.Path("b"))
335func LenLTE(column string, size int, opts ...Option) *sql.Predicate {
336 return sql.P(func(b *sql.Builder) {
337 lenPath(b, column, opts...)
338 b.WriteOp(sql.OpLTE).Arg(size)
339 })
340}
341
342// LenPath returns an SQL expression for getting the length
343// of a JSON value (returned by the path).

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…