preql-0.5: safe PostgreSQL queries using Quasiquoters
Safe HaskellNone
LanguageHaskell2010

Preql.QuasiQuoter.Syntax.TH

Synopsis

Documentation

makeArityQuery :: Statement -> Q Exp Source #

Synthesize a Query tagged with the number of returned columns.

select :: QuasiQuoter Source #

This quasiquoter will accept most syntactically valid SELECT queries. Language features not yet implemented include type casts, lateral joins, EXTRACT, INTO, string & XML operators, and user-defined operators. For now, please fall back to sql for these less-frequently used SQL features, or file a bug report if a commonly used feature is not parsed correctly.

select accepts antiquotes with the same syntax as sql.

validSql :: QuasiQuoter Source #

This quasiquoter will accept all queries accepted by select, and limited INSERT, UPDATE, and DELETE queries. For details of what can be parsed, consult Parser.y

aritySql :: (String -> String -> Either String a) -> (a -> Statement) -> String -> Q Exp Source #