columnToSql function
Converts a SelectedColumn to a SQL string.
Implementation
String columnToSql(SelectedColumn col) => switch (col) {
AllColumns() => col.tableName != null ? '${col.tableName}.*' : '*',
ColumnReference() => col.tableName != null
? '${col.tableName}.${col.columnName}'
: col.columnName,
};