compileOrders method
Compile the "order by" portion of the query.
Implementation
String compileOrders(List<Map<String, dynamic>> orders) {
if (orders.isEmpty) return '';
final lines = orders.map((order) {
if (order['type'] == 'Raw') return order['sql'];
return '${wrap(order['column'])} ${order['direction']}';
}).toList();
return 'ORDER BY ${lines.join(', ')}';
}