Safe Haskell | None |
---|---|
Language | Haskell2010 |
- readFileAsSQL :: String -> Q Exp
Documentation
readFileAsSQL :: String -> Q Exp Source
Read an SQL-file, containing multiple statements,
and produce an expression of type ByteString
.
Allows to store plain SQL in external files and read it at compile time.
E.g.,
migration1 :: Hasql.Session.Session () migration1 = Hasql.Session.sql $(Hasql.TH.readFileAsSQL "sql/migration-1.sql")