sql_formatter library

A pure-Dart SQL pretty-printer.

import 'package:sql_formatter/sql_formatter.dart';

void main() {
  print(format('select a,b from t where a=1'));
}

Classes

FormatOptions
Options controlling how SQL is formatted.

Enums

KeywordCase
How reserved keywords and built-in function names should be cased in the formatted output.
SqlDialect
The set of SQL dialects this formatter understands.

Functions

format(String sql, {SqlDialect dialect = SqlDialect.standard, FormatOptions options = const FormatOptions()}) String
Formats a SQL sql string using the given dialect and options.