LenEQ return a predicate for checking that an array length of a JSON (returned by the path) is equal to the given argument. sqljson.LenEQ("a", 1, sqljson.Path("b"))
(column string, size int, opts ...Option)
| 274 | // |
| 275 | // sqljson.LenEQ("a", 1, sqljson.Path("b")) |
| 276 | func LenEQ(column string, size int, opts ...Option) *sql.Predicate { |
| 277 | return sql.P(func(b *sql.Builder) { |
| 278 | lenPath(b, column, opts...) |
| 279 | b.WriteOp(sql.OpEQ).Arg(size) |
| 280 | }) |
| 281 | } |
| 282 | |
| 283 | // LenNEQ return a predicate for checking that an array length |
| 284 | // of a JSON (returned by the path) is not equal to the given argument. |
searching dependent graphs…