Safe Haskell | None |
---|---|
Language | Haskell2010 |
SQL queries files utilities
Documentation
queriesLoad :: Text -> IO Queries Source #
Parses a specified SQL file into a HashMap
that contains
all SQL queries as map entries
SQL file example:
-- -- test queries -- /** selectFoo */ select foo from bar /** updateBar */ update bar set foo = 42
Note: there must be an empty line after the initial comment lines on the top of the file
Throws an error on file IO error or parsing error
Arguments:
path :: Text
: Path to SQL file
Return value: HashMap
containing SQL queries from a file