MCPcopy Index your code
hub / github.com/ent/ent / OrderValueDesc

Function OrderValueDesc

dialect/sql/sqljson/sqljson.go:496–502  ·  view source on GitHub ↗

OrderValueDesc returns a custom predicate function (as defined in the doc), that sets the result order by the given JSON value, but in descending order.

(column string, opts ...Option)

Source from the content-addressed store, hash-verified

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.
496func OrderValueDesc(column string, opts ...Option) func(*sql.Selector) {
497 return func(s *sql.Selector) {
498 s.OrderExpr(
499 sql.DescExpr(ValuePath(column, opts...)),
500 )
501 }
502}
503
504// valuePath writes to the given SQL builder the JSON path for
505// getting the value of a given JSON path.

Callers 1

OrderFunction · 0.92

Calls 3

DescExprFunction · 0.92
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…