hssqlppp-0.4.0: SQL parser and type checker



Functions to convert sql asts to valid SQL source code. Includes a function - printSqlAnn - to output the annotations from a tree in comments in the outputted SQL source.

Produces sort of readable code, but mainly just written to produce reparsable text. Could do with some work to make the outputted text layout better.



printStatements :: StatementList -> StringSource

convert an ast back to valid SQL source, it's also almost human readable.

printStatementsAnn :: (Annotation -> String) -> StatementList -> StringSource

convert the ast back to valid source, and convert any annotations to text using the function provided and interpolate the output of this function(inside comments) with the SQL source.

printScalarExpr :: ScalarExpr -> StringSource

Testing function, pretty print an expression

printQueryExprNice :: QueryExpr -> StringSource

Try harder to make the output human readable, not necessary correct sql output at the moment