ValuePath returns an SQL expression for getting the JSON value of a column with an optional path and cast options. sqljson.ValueEQ( column, sqljson.ValuePath(column, Path("a"), Cast("int")), sqljson.Path("a"), )
(column string, opts ...Option)
| 478 | // sqljson.Path("a"), |
| 479 | // ) |
| 480 | func ValuePath(column string, opts ...Option) sql.Querier { |
| 481 | return sql.ExprFunc(func(b *sql.Builder) { |
| 482 | valuePath(b, column, opts...) |
| 483 | }) |
| 484 | } |
| 485 | |
| 486 | // OrderValue returns a custom predicate function (as defined in the doc), |
| 487 | // that sets the result order by the given JSON value. |
searching dependent graphs…