hasql-interpolate-0.2.1.0: QuasiQuoter that supports expression interpolation for hasql
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasql.Interpolate.Internal.TH

Synopsis

Documentation

sql :: QuasiQuoter Source #

QuasiQuoter that supports interpolation and splices. Produces a Sql.

#{..} interpolates a haskell expression into a sql query.

example1 :: EncodeValue a => a -> Sql
example1 x = [sql| select #{x} |]

^{..} introduces a splice, which allows us to inject a sql snippet along with the associated parameters into another sql snippet.

example2 :: Sql
example2 = [sql| ^{example1 True} where true |]

data SqlExpr Source #

Instances

Instances details
Show SqlExpr Source # 
Instance details

Defined in Hasql.Interpolate.Internal.TH

Eq SqlExpr Source # 
Instance details

Defined in Hasql.Interpolate.Internal.TH

data SpliceBind Source #

Constructors

SpliceBind