|
|
|
@ -580,8 +580,10 @@ ${qb.toQuery()}
|
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
selectors.push(column.column_name); |
|
|
|
|
groupBySelectors.push(sanitize(column.column_name)); |
|
|
|
|
selectors.push( |
|
|
|
|
this.dbDriver.raw('?? as ??', [column.column_name, column.title]), |
|
|
|
|
); |
|
|
|
|
groupBySelectors.push(sanitize(column.title)); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
@ -642,6 +644,8 @@ ${qb.toQuery()}
|
|
|
|
|
qb.orderBy( |
|
|
|
|
groupByColumns[sort.fk_column_id].column_name || |
|
|
|
|
groupByColumns[sort.fk_column_id].title, |
|
|
|
|
sort.direction, |
|
|
|
|
sort.direction === 'desc' ? 'LAST' : 'FIRST', |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -736,8 +740,13 @@ ${qb.toQuery()}
|
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
selectors.push(column.column_name); |
|
|
|
|
groupBySelectors.push(sanitize(column.column_name)); |
|
|
|
|
selectors.push( |
|
|
|
|
this.dbDriver.raw('?? as ??', [ |
|
|
|
|
column.column_name, |
|
|
|
|
column.title, |
|
|
|
|
]), |
|
|
|
|
); |
|
|
|
|
groupBySelectors.push(sanitize(column.title)); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|