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

Function OrderByCount

dialect/sql/sql.go:368–370  ·  view source on GitHub ↗

OrderByCount returns an ordering by the count of the given field.

(field string, opts ...OrderTermOption)

Source from the content-addressed store, hash-verified

366
367// OrderByCount returns an ordering by the count of the given field.
368func OrderByCount(field string, opts ...OrderTermOption) *OrderExprTerm {
369 return orderByAgg("COUNT", field, opts...)
370}
371
372// orderByAgg returns an ordering by the aggregation of the given field.
373func orderByAgg(fn, field string, opts ...OrderTermOption) *OrderExprTerm {

Callers 1

OrderByNeighborsCountFunction · 0.92

Calls 1

orderByAggFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…