MCPcopy
hub / github.com/ent/ent / OrderValue

Function OrderValue

dialect/sql/sqljson/sqljson.go:488–492  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

486// OrderValue returns a custom predicate function (as defined in the doc),
487// that sets the result order by the given JSON value.
488func 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.

Callers 1

OrderFunction · 0.92

Calls 2

ValuePathFunction · 0.85
OrderExprMethod · 0.45

Tested by 1

OrderFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…