OrderValue returns a custom predicate function (as defined in the doc), that sets the result order by the given JSON value.
(column string, opts ...Option)
| 486 | // OrderValue returns a custom predicate function (as defined in the doc), |
| 487 | // that sets the result order by the given JSON value. |
| 488 | func OrderValue(column string, opts ...Option) func(*sql.Selector) { |
| 489 | return func(s *sql.Selector) { |
| 490 | s.OrderExpr(ValuePath(column, opts...)) |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | // OrderValueDesc returns a custom predicate function (as defined in the doc), |
| 495 | // that sets the result order by the given JSON value, but in descending order. |