hssqlppp-0.4.0: SQL parser and type checker

Database.HsSqlPpp.Quote

Description

A quasiquoter for SQL. Antiquoting is a bit inconsistent. The splice variable names must be all lower case because of a limitation in the parser.

Example:

 
 import Database.HsSqlPpp.Ast
 import Database.HsSqlPpp.Quote
 import Database.HsSqlPpp.Annotation

 test :: Statement
 test = [$sqlStmt|

   create table $(tablename) (
    $(varname) $(typename)
   );

         |]
   where
     tablename = "my_table"
     varname = "my_field"
     typename = "text"

See http://jakewheat.github.com/hssqlppp/QuasiQuoteTests.html for more simple examples

Synopsis

Documentation

sqlStmts :: QuasiQuoter

quotes Statements

sqlStmt :: QuasiQuoter

quotes a single Statement

pgsqlStmts :: QuasiQuoter

quotes plpgsql Statements

pgsqlStmt :: QuasiQuoter

quotes a plpgsql Statement

sqlExpr :: QuasiQuoter

quotes a ScalarExpr