statementToSql function
String
statementToSql(
- SelectStatement statement, {
- Formatter<
List< selectFormatter = defaultSelectFormatter,SelectedColumn> > - Formatter<
String> fromFormatter = identity, - Formatter<
List< joinFormatter = defaultJoinFormatter,Join> > - Formatter<
WhereClauseGroup> whereFormatter = defaultWhereFormatter, - Formatter<
List< orderByFormatter = defaultOrderByFormatter,OrderByElement> > - Formatter<
AllClauses> allClausesFormatter = defaultAllClausesFormatter,
Converts a SelectStatement to an SQL string.
Implementation
String statementToSql(
SelectStatement statement, {
Formatter<List<SelectedColumn>> selectFormatter = defaultSelectFormatter,
Formatter<String> fromFormatter = identity,
Formatter<List<Join>> joinFormatter = defaultJoinFormatter,
Formatter<WhereClauseGroup> whereFormatter = defaultWhereFormatter,
Formatter<List<OrderByElement>> orderByFormatter = defaultOrderByFormatter,
Formatter<AllClauses> allClausesFormatter = defaultAllClausesFormatter,
}) =>
allClausesFormatter(
(
selectClause: selectFormatter(statement.select),
fromClause: fromFormatter(statement.from),
joinClause: joinFormatter(statement.joins),
whereClause: whereFormatter(statement.where),
orderByClause: orderByFormatter(statement.orderBy)
),
);