LenPath returns an SQL expression for getting the length of a JSON value (returned by the path).
(column string, opts ...Option)
| 342 | // LenPath returns an SQL expression for getting the length |
| 343 | // of a JSON value (returned by the path). |
| 344 | func LenPath(column string, opts ...Option) sql.Querier { |
| 345 | return sql.ExprFunc(func(b *sql.Builder) { |
| 346 | lenPath(b, column, opts...) |
| 347 | }) |
| 348 | } |
| 349 | |
| 350 | // OrderLen returns a custom predicate function (as defined in the doc), |
| 351 | // that sets the result order by the length of the given JSON value. |
searching dependent graphs…