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)
| 333 | // |
| 334 | // sqljson.LenLTE("a", 1, sqljson.Path("b")) |
| 335 | func 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). |
searching dependent graphs…