MCPcopy
hub / github.com/ent/ent / OrderExprFunc

Method OrderExprFunc

dialect/sql/builder.go:2470–2474  ·  view source on GitHub ↗

OrderExprFunc appends the `ORDER BY` expression that evaluates the given function.

(f func(*Builder))

Source from the content-addressed store, hash-verified

2468// OrderExprFunc appends the `ORDER BY` expression that evaluates
2469// the given function.
2470func (s *Selector) OrderExprFunc(f func(*Builder)) *Selector {
2471 return s.OrderExpr(
2472 Dialect(s.Dialect()).Expr(f),
2473 )
2474}
2475
2476// ClearOrder clears the ORDER BY clause to be empty.
2477func (s *Selector) ClearOrder() *Selector {

Callers 3

OrderByRandFunction · 0.80
ToFuncMethod · 0.80
orderTermsFunction · 0.80

Calls 4

OrderExprMethod · 0.95
DialectFunction · 0.85
ExprMethod · 0.80
DialectMethod · 0.65

Tested by

no test coverage detected