Maintainer | Brandon Chinn <brandonchinn178@gmail.com> |
---|---|
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Defines helper functions for writing SQL queries.
Documentation
commas :: Text -> [Text] Source #
Split the given line by commas, ignoring commas within parentheses.
commas "a,b,c" == ["a", "b", "c"] commas "a,b,c (d,e),z" == ["a", "b", "c (d,e)", "z"] commas "a,b,c (d,e,(f,g)),z" == ["a", "b", "c (d,e,(f,g))", "z"]
interpolate :: Text -> [PersistValue] -> Text Source #
Interpolate the given values into the SQL string.