Please reconsider the idea why you implemented order by in this strange way:
CASE WHEN {{ tblResults.sortedColumn == ‘x_at’ && tblResults.sortedDesc }} THEN o.x_at END DESC,
CASE WHEN {{ tblResults.sortedColumn == ‘x_at’ && !tblResults.sortedDesc }} THEN o.x_at END ASC,
I’d like to have ability writing normal javascript in {{ }}, something like this
Order by {{
${table.sortedColumn?table.sortedColumn:'x_at'} ${table.sortedDesc?'DESC':'ASC'}
}}
With the current approach if I have many columns that could be sortable, I have to append to the query case for EACH column, that is so inconvinient.