lib/compiler.js
function _groupsOrders(type) {
    var items = this.grouped[type];
    if (!items) {
      return '';
    }
    var formatter = this.formatter;
    var sql = items.map(function (item) {
      return (item.value instanceof Raw ? formatter.unwrapRaw(item.value) : formatter.columnize(item.value)) + (type === 'order' && item.type !== 'orderByRaw' ? ' ' + formatter.direction(item.direction) : '');
    });
    return sql.length ? type + ' by ' + sql.join(', ') : '';
  }
function _groupsOrders(type) {
    var items = this.grouped[type];
    if (!items) {
      return '';
    }
    var formatter = this.formatter;
    var sql = items.map(function (item) {
      return (item.value instanceof Raw ? formatter.unwrapRaw(item.value) : formatter.columnize(item.value)) + (type === 'order' && item.type !== 'orderByRaw' ? ' ' + formatter.direction(item.direction) : '');
    });
    return sql.length ? type + ' by ' + sql.join(', ') : '';
  }
function _groupsOrders ( type ) { var items = this . grouped [ type ] ; if ( ! items ) { return '' ; } var formatter = this . formatter ; var sql = items . map ( function ( item ) { return ( item . value instanceof Raw ? formatter . unwrapRaw ( item . value ) : formatter . columnize ( item . value ) ) + ( type === 'order' && item . type !== 'orderByRaw' ? ' ' + formatter . direction ( item . direction ) : '' ) ; } ) ; return sql . length ? type + ' by ' + sql . join ( ', ' ) : '' ; }
Compiles the `order by` statements.
Compiles the order by statements .