Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ContentType
- data ApiRequestError
- data PreferResolution
- data DbStructure = DbStructure {
- dbTables :: [Table]
- dbColumns :: [Column]
- dbRelations :: [Relation]
- dbPrimaryKeys :: [PrimaryKey]
- dbProcs :: HashMap Text [ProcDescription]
- pgVersion :: PgVersion
- tableCols :: DbStructure -> Schema -> TableName -> [Column]
- tablePKCols :: DbStructure -> Schema -> TableName -> [Text]
- data PgArg = PgArg {}
- data PgType
- data RetType
- data ProcVolatility
- data ProcDescription = ProcDescription {
- pdName :: Text
- pdDescription :: Maybe Text
- pdArgs :: [PgArg]
- pdReturnType :: RetType
- pdVolatility :: ProcVolatility
- type Schema = Text
- type TableName = Text
- type SqlQuery = Text
- type SqlFragment = Text
- data Table = Table {}
- newtype ForeignKey = ForeignKey {}
- data Column = Column {
- colTable :: Table
- colName :: Text
- colDescription :: Maybe Text
- colPosition :: Int32
- colNullable :: Bool
- colType :: Text
- colUpdatable :: Bool
- colMaxLen :: Maybe Int32
- colPrecision :: Maybe Int32
- colDefault :: Maybe Text
- colEnum :: [Text]
- colFK :: Maybe ForeignKey
- type Synonym = (Column, ViewColumn)
- type ViewColumn = Column
- data PrimaryKey = PrimaryKey {}
- data OrderDirection
- data OrderNulls
- data OrderTerm = OrderTerm {}
- data QualifiedIdentifier = QualifiedIdentifier {}
- data RelationType
- data Relation = Relation {
- relTable :: Table
- relColumns :: [Column]
- relFTable :: Table
- relFColumns :: [Column]
- relType :: RelationType
- relLinkTable :: Maybe Table
- relLinkCols1 :: Maybe [Column]
- relLinkCols2 :: Maybe [Column]
- data PayloadJSON = PayloadJSON {}
- data PJType
- pjIsEmpty :: PayloadJSON -> Bool
- data Proxy = Proxy {}
- type Operator = Text
- operators :: HashMap Operator SqlFragment
- ftsOperators :: HashMap Operator SqlFragment
- data OpExpr = OpExpr Bool Operation
- data Operation
- type Language = Text
- type SingleVal = Text
- type ListVal = [Text]
- data LogicOperator
- data LogicTree
- type FieldName = Text
- type JsonPath = [Text]
- type Field = (FieldName, Maybe JsonPath)
- type Alias = Text
- type Cast = Text
- type NodeName = Text
- type RpcQParam = (Text, Text)
- newtype GucHeader = GucHeader (Text, Text)
- toHeaders :: [GucHeader] -> [Header]
- type RelationDetail = Text
- type SelectItem = (Field, Maybe Cast, Maybe Alias, Maybe RelationDetail)
- type EmbedPath = [Text]
- data Filter = Filter {}
- data JoinCondition = JoinCondition (QualifiedIdentifier, Maybe Alias, FieldName) (QualifiedIdentifier, Maybe Alias, FieldName)
- data ReadQuery = Select {
- select :: [SelectItem]
- from :: [TableName]
- where_ :: [LogicTree]
- joinConditions :: [JoinCondition]
- order :: [OrderTerm]
- range_ :: NonnegRange
- data MutateQuery
- type ReadNode = (ReadQuery, (NodeName, Maybe Relation, Maybe Alias, Maybe RelationDetail, Depth))
- type ReadRequest = Tree ReadNode
- type Depth = Integer
- type MutateRequest = MutateQuery
- data DbRequest
- toHeader :: ContentType -> Header
- toMime :: ContentType -> ByteString
- data PgVersion = PgVersion {}
- sourceCTEName :: SqlFragment
- type JSPath = [JSPathExp]
- data JSPathExp
Documentation
data ContentType Source #
Enumeration of currently supported response content types
data ApiRequestError Source #
data PreferResolution Source #
data DbStructure Source #
DbStructure | |
|
tablePKCols :: DbStructure -> Schema -> TableName -> [Text] Source #
data ProcVolatility Source #
data ProcDescription Source #
ProcDescription | |
|
type SqlFragment = Text Source #
Table | |
|
newtype ForeignKey Source #
Column | |
|
type Synonym = (Column, ViewColumn) Source #
A view column that refers to a table column
type ViewColumn = Column Source #
data PrimaryKey Source #
data OrderDirection Source #
data OrderNulls Source #
data QualifiedIdentifier Source #
data RelationType Source #
The name Relation
here is used with the meaning
"What is the relation between the current node and the parent node".
It has nothing to do with PostgreSQL referring to tables/views as relations.
Relation | |
|
data PayloadJSON Source #
Cached attributes of a JSON payload
PayloadJSON | |
|
pjIsEmpty :: PayloadJSON -> Bool Source #
e.g. whether it is []/{} or not
Boolean logic expression tree e.g. "and(name.eq.N,or(id.eq.1,id.eq.2))" is:
And / name.eq.N Or / id.eq.1 id.eq.2
Custom guc header, it's obtained by parsing the json in a: `SET LOCAL "response.headers" = '[{Set-Cookie: ".."}]'
type RelationDetail = Text Source #
This type will hold information about which particular Relation
between two tables to choose when there are multiple ones.
Specifically, it will contain the name of the foreign key or the join table in many to many relations.
type SelectItem = (Field, Maybe Cast, Maybe Alias, Maybe RelationDetail) Source #
type EmbedPath = [Text] Source #
Path of the embedded levels, e.g "clients.projects.name=eq.." gives Path ["clients", "projects"]
data JoinCondition Source #
Select | |
|
data MutateQuery Source #
type ReadNode = (ReadQuery, (NodeName, Maybe Relation, Maybe Alias, Maybe RelationDetail, Depth)) Source #
type ReadRequest = Tree ReadNode Source #
type MutateRequest = MutateQuery Source #
toHeader :: ContentType -> Header Source #
Convert from ContentType to a full HTTP Header
toMime :: ContentType -> ByteString Source #
Convert from ContentType to a ByteString representing the mime type