Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mkSqlGenerator :: SqlGenerator -> SqlGenerator
- defaultSqlGenerator :: SqlGenerator
- toSqlOrder :: SqlGenerator -> OrderExpr -> (SqlExpr, SqlOrder)
- toSqlColumn :: Attribute -> SqlColumn
- toSqlAssoc :: SqlGenerator -> Assoc -> [(SqlColumn, SqlExpr)]
- defaultSqlUpdate :: SqlGenerator -> SqlTable -> [PrimExpr] -> Assoc -> SqlUpdate
- defaultSqlInsert :: SqlGenerator -> SqlTable -> [Attribute] -> NonEmpty [PrimExpr] -> Maybe OnConflict -> SqlInsert
- defaultSqlDelete :: SqlGenerator -> SqlTable -> [PrimExpr] -> SqlDelete
- defaultSqlExpr :: SqlGenerator -> PrimExpr -> SqlExpr
- showBinOp :: BinOp -> String
- data UnOpType
- sqlUnOp :: UnOp -> (String, UnOpType)
- showAggrOp :: AggrOp -> String
- defaultSqlLiteral :: SqlGenerator -> Literal -> String
- defaultSqlQuote :: SqlGenerator -> String -> String
- quote :: String -> String
- escape :: Char -> String
- binQuote :: ByteString -> String
Documentation
toSqlOrder :: SqlGenerator -> OrderExpr -> (SqlExpr, SqlOrder) Source #
toSqlColumn :: Attribute -> SqlColumn Source #
toSqlAssoc :: SqlGenerator -> Assoc -> [(SqlColumn, SqlExpr)] Source #
:: SqlGenerator | |
-> SqlTable | Table to update |
-> [PrimExpr] | Conditions which must all be true for a row to be updated. |
-> Assoc | Update the data with this. |
-> SqlUpdate |
defaultSqlInsert :: SqlGenerator -> SqlTable -> [Attribute] -> NonEmpty [PrimExpr] -> Maybe OnConflict -> SqlInsert Source #
:: SqlGenerator | |
-> SqlTable | |
-> [PrimExpr] | Criteria which must all be true for a row to be deleted. |
-> SqlDelete |
defaultSqlExpr :: SqlGenerator -> PrimExpr -> SqlExpr Source #
showAggrOp :: AggrOp -> String Source #
defaultSqlLiteral :: SqlGenerator -> Literal -> String Source #
defaultSqlQuote :: SqlGenerator -> String -> String Source #
quote :: String -> String Source #
Quote a string and escape characters that need escaping We use Postgres "escape strings", i.e. strings prefixed with E, to ensure that escaping with backslash is valid.
binQuote :: ByteString -> String Source #
Quote binary literals using Postgresql's hex format.