Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides functions to consume data types that represent database objects (e.g. Relation, Schema, SqlQuery) and produces SQL Statements.
Any function that outputs a SQL fragment should be in this module.
- callProc :: QualifiedIdentifier -> [PgArg] -> Bool -> SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe FieldName -> Bool -> PgVersion -> Query ByteString (Maybe ProcResults)
- createReadStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Maybe FieldName -> Query () ResultsWithCount
- createWriteStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> PreferRepresentation -> [Text] -> Query ByteString (Maybe ResultsWithCount)
- pgFmtIdent :: SqlFragment -> SqlFragment
- pgFmtLit :: SqlFragment -> SqlFragment
- requestToQuery :: Schema -> Bool -> DbRequest -> SqlQuery
- requestToCountQuery :: Schema -> DbRequest -> SqlQuery
- unquoted :: Value -> Text
- type ResultsWithCount = (Maybe Int64, Int64, [ByteString], ByteString)
- pgFmtEnvVar :: Text -> (Text, Text) -> SqlFragment
Documentation
callProc :: QualifiedIdentifier -> [PgArg] -> Bool -> SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe FieldName -> Bool -> PgVersion -> Query ByteString (Maybe ProcResults) Source #
createReadStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Maybe FieldName -> Query () ResultsWithCount Source #
createWriteStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> PreferRepresentation -> [Text] -> Query ByteString (Maybe ResultsWithCount) Source #
pgFmtIdent :: SqlFragment -> SqlFragment Source #
pgFmtLit :: SqlFragment -> SqlFragment Source #
type ResultsWithCount = (Maybe Int64, Int64, [ByteString], ByteString) Source #
The generic query result format used by API responses. The location header
is represented as a list of strings containing variable bindings like
"k1=eq.42"
, or the empty list if there is no location header.
pgFmtEnvVar :: Text -> (Text, Text) -> SqlFragment Source #