MCPcopy Create free account
hub / github.com/go-pg/pg / OrderExpr

Method OrderExpr

orm/query.go:732–737  ·  view source on GitHub ↗

Order adds sort order to the Query.

(order string, params ...interface{})

Source from the content-addressed store, hash-verified

730
731// Order adds sort order to the Query.
732func (q *Query) OrderExpr(order string, params ...interface{}) *Query {
733 if order != "" {
734 q.order = append(q.order, SafeQuery(order, params...))
735 }
736 return q
737}
738
739func (q *Query) Limit(n int) *Query {
740 q.limit = n

Callers 12

WherePKMethod · 0.95
OrderMethod · 0.95
FirstMethod · 0.95
LastMethod · 0.95
ExampleDB_Model_forEachFunction · 0.80
db_test.goFile · 0.80
select_test.goFile · 0.80

Calls 1

SafeQueryFunction · 0.70