-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Interpolated SQLite queries via quasiquotation -- -- This package provides Quasiquoters for writing SQLite queries with -- inline interpolation of values. The values are interpolated using -- toField from sqlite-simple. See the README for more details. @package sqlite-simple-interpolate @version 0.1 -- | Interpolated SQL queries module Database.SQLite.Simple.QQ.Interpolated -- | Quote a SQL statement with embedded antiquoted expressions. -- -- The result of the quasiquoter is a tuple, containing the statement -- string and a list of parameters. For example: -- --
-- [isql|SELECT field FROM table WHERE name = ${map toLower ELLIOT} LIMIT ${10}|]
--
--
-- produces
--
--
-- ("SELECT field FROM table WHERE name = ? LIMIT ?", [toField ((map toLower) ELLIOT), toField 10])
--
--
-- How the parser works:
--
-- Any expression occurring between ${ and } will be
-- replaced with a ? and passed as a query parameter.
--
-- Characters preceded by a backslash are treated literally. This enables
-- the inclusion of the literal substring ${ within your quoted
-- text by writing it as \${. The literal sequence \${
-- may be written as \\${.
--
-- Note: This quasiquoter is a wrapper around sql.
--
-- This quasiquoter only works in expression contexts and will throw an
-- error at compile time if used in any other context.
isql :: QuasiQuoter
-- | The internal parser used by isql.
quoteInterpolatedSql :: String -> Q Exp
-- | Invokes query with arguments provided by isql. The
-- result is of type '(Connection -> IO [r])'.
iquery :: QuasiQuoter
-- | Invokes execute with arguments provided by isql The
-- result is of type '(Connection -> IO ())'.
iexecute :: QuasiQuoter
-- | Invokes fold with arguments provided by isql. The result
-- is of type 'a -> (a -> row -> IO a) -> Connection -> IO
-- a'.
ifold :: QuasiQuoter