simple-sql-parser-0.6.0: A parser for SQL.

Safe HaskellSafe
LanguageHaskell2010

Language.SQL.SimpleSQL.Pretty

Description

These is the pretty printing functions, which produce SQL source from ASTs. The code attempts to format the output in a readable way.

Synopsis

Documentation

prettyQueryExpr :: Dialect -> QueryExpr -> String Source #

Convert a query expr ast to concrete syntax.

prettyScalarExpr :: Dialect -> ScalarExpr -> String Source #

Convert a value expr ast to concrete syntax.

prettyStatement :: Dialect -> Statement -> String Source #

Convert a statement ast to concrete syntax.

prettyStatements :: Dialect -> [Statement] -> String Source #

Convert a list of statements to concrete syntax. A semicolon is inserted after each statement.