OrderBy appends the `ORDER BY` clause to the `SELECT` statement.
(columns ...string)
| 2438 | |
| 2439 | // OrderBy appends the `ORDER BY` clause to the `SELECT` statement. |
| 2440 | func (s *Selector) OrderBy(columns ...string) *Selector { |
| 2441 | for i := range columns { |
| 2442 | s.order = append(s.order, columns[i]) |
| 2443 | } |
| 2444 | return s |
| 2445 | } |
| 2446 | |
| 2447 | // OrderColumns returns the ordered columns in the Selector. |
| 2448 | // Note, this function skips columns selected with expressions. |
no outgoing calls