(column string, args []any, opts []Option, op sql.Op)
| 250 | } |
| 251 | |
| 252 | func valueInOp(column string, args []any, opts []Option, op sql.Op) *sql.Predicate { |
| 253 | return sql.P(func(b *sql.Builder) { |
| 254 | if allString(args) { |
| 255 | opts = append(opts, Unquote(true)) |
| 256 | } |
| 257 | if len(args) > 0 { |
| 258 | opts = normalizePG(b, args[0], opts) |
| 259 | } |
| 260 | valuePath(b, column, opts...) |
| 261 | b.WriteOp(op) |
| 262 | b.Wrap(func(b *sql.Builder) { |
| 263 | if s, ok := args[0].(*sql.Selector); ok { |
| 264 | b.Join(s) |
| 265 | } else { |
| 266 | b.Args(args...) |
| 267 | } |
| 268 | }) |
| 269 | }) |
| 270 | } |
| 271 | |
| 272 | // LenEQ return a predicate for checking that an array length |
| 273 | // of a JSON (returned by the path) is equal to the given argument. |
no test coverage detected
searching dependent graphs…