columnToSql function

String columnToSql(
  1. SelectedColumn col
)

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,
    };