MCPcopy
hub / github.com/ent/ent / lenPath

Function lenPath

dialect/sql/sqljson/sqljson.go:372–375  ·  view source on GitHub ↗

LenPath writes to the given SQL builder the JSON path for getting the length of a given JSON path. sqljson.LenPath(b, Path("a", "b", "[1]", "c"))

(b *sql.Builder, column string, opts ...Option)

Source from the content-addressed store, hash-verified

370//
371// sqljson.LenPath(b, Path("a", "b", "[1]", "c"))
372func lenPath(b *sql.Builder, column string, opts ...Option) {
373 path := identPath(column, opts...)
374 path.length(b)
375}
376
377// Append writes to the given SQL builder the SQL command for appending JSON values
378// into the array, optionally defined as a key. Note, the generated SQL will use the

Callers 7

LenEQFunction · 0.85
LenNEQFunction · 0.85
LenGTFunction · 0.85
LenGTEFunction · 0.85
LenLTFunction · 0.85
LenLTEFunction · 0.85
LenPathFunction · 0.85

Calls 2

identPathFunction · 0.85
lengthMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…