formatClause function

String formatClause(
  1. String keyword,
  2. String clause,
  3. FormattingOptions options, {
  4. bool isSubclause = false,
})

Formats the SELECT clause.

Implementation

String formatClause(
  String keyword,
  String clause,
  FormattingOptions options, {
  bool isSubclause = false,
}) =>
    '${options.uppercaseKeywords ? keyword.toUpperCase() : keyword} '
    '${clause.contains(',') ? clause.split(',').map((s) => s.trim()).join(
          ',${options.newline}${options.indent * options.subClauseIndent}',
        ) : clause.trim()}';