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