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.
Synopsis
- callProc :: QualifiedIdentifier -> [PgArg] -> Bool -> SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe FieldName -> PgVersion -> Statement ByteString (Maybe ProcResults)
- createReadStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Maybe FieldName -> Statement () ResultsWithCount
- createWriteStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> PreferRepresentation -> [Text] -> Statement ByteString (Maybe ResultsWithCount)
- requestToQuery :: Schema -> Bool -> DbRequest -> SqlQuery
- requestToCountQuery :: Schema -> DbRequest -> SqlQuery
- unquoted :: Value -> Text
- type ResultsWithCount = (Maybe Int64, Int64, [ByteString], ByteString)
- pgFmtSetLocal :: Text -> (Text, Text) -> SqlFragment
- pgFmtSetLocalSearchPath :: [Text] -> SqlFragment
Documentation
callProc :: QualifiedIdentifier -> [PgArg] -> Bool -> SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe FieldName -> PgVersion -> Statement ByteString (Maybe ProcResults) Source #
createReadStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> Maybe FieldName -> Statement () ResultsWithCount Source #
createWriteStatement :: SqlQuery -> SqlQuery -> Bool -> Bool -> Bool -> PreferRepresentation -> [Text] -> Statement ByteString (Maybe ResultsWithCount) 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.
pgFmtSetLocal :: Text -> (Text, Text) -> SqlFragment Source #
pgFmtSetLocalSearchPath :: [Text] -> SqlFragment Source #