Safe Haskell | None |
---|---|
Language | Haskell2010 |
PostgREST.Types
- data ContentType
- data ApiRequestError
- data DbStructure = DbStructure {
- dbTables :: [Table]
- dbColumns :: [Column]
- dbRelations :: [Relation]
- dbPrimaryKeys :: [PrimaryKey]
- dbProcs :: HashMap Text ProcDescription
- data PgArg = PgArg {}
- data PgType
- data RetType
- data ProcVolatility
- data ProcDescription = ProcDescription {
- pdName :: Text
- pdArgs :: [PgArg]
- pdReturnType :: RetType
- pdVolatility :: ProcVolatility
- type Schema = Text
- type TableName = Text
- type SqlQuery = Text
- type SqlFragment = Text
- type RequestBody = ByteString
- data Table = Table {}
- newtype ForeignKey = ForeignKey {}
- data Column = Column {
- colTable :: Table
- colName :: 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, Column)
- data PrimaryKey = PrimaryKey {}
- data OrderDirection
- data OrderNulls
- data OrderTerm = OrderTerm {}
- data QualifiedIdentifier = QualifiedIdentifier {}
- data RelationType
- data Relation = Relation {}
- newtype PayloadJSON = PayloadJSON (Vector Object)
- unPayloadJSON :: PayloadJSON -> Vector Object
- data Proxy = Proxy {}
- type Operator = Text
- operators :: HashMap Operator SqlFragment
- data Operation = Operation {}
- data Operand
- 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 SelectItem = (Field, Maybe Cast, Maybe Alias)
- type EmbedPath = [Text]
- data Filter = Filter {}
- data ReadQuery = Select {}
- data MutateQuery
- type ReadNode = (ReadQuery, (NodeName, Maybe Relation, Maybe Alias))
- type ReadRequest = Tree ReadNode
- type MutateRequest = MutateQuery
- data DbRequest
- toHeader :: ContentType -> Header
- toMime :: ContentType -> ByteString
Documentation
data ContentType #
Enumeration of currently supported response content types
Constructors
CTApplicationJSON | |
CTTextCSV | |
CTOpenAPI | |
CTSingularJSON | |
CTOctetStream | |
CTAny | |
CTOther ByteString |
Instances
data ApiRequestError #
Constructors
ActionInappropriate | |
InvalidBody ByteString | |
InvalidRange | |
ParseRequestError Text Text | |
UnknownRelation | |
NoRelationBetween Text Text | |
UnsupportedVerb |
Instances
data DbStructure #
Constructors
DbStructure | |
Fields
|
Instances
Constructors
Scalar QualifiedIdentifier | |
Composite QualifiedIdentifier | |
Pseudo Text |
data ProcVolatility #
Instances
data ProcDescription #
Constructors
ProcDescription | |
Fields
|
Instances
type SqlFragment = Text #
type RequestBody = ByteString #
Constructors
Table | |
Fields
|
Constructors
Column | |
Fields
|
data OrderDirection #
Instances
Constructors
OrderTerm | |
Fields |
data RelationType #
Instances
Constructors
Relation | |
newtype PayloadJSON #
An array of JSON objects that has been verified to have the same keys in every object
Constructors
PayloadJSON (Vector Object) |
Instances
unPayloadJSON :: PayloadJSON -> Vector Object #
Constructors
Proxy | |
Constructors
VText Text | |
VTextL [Text] | |
VForeignKey QualifiedIdentifier ForeignKey |
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
Path of the embedded levels, e.g "clients.projects.name=eq.." gives Path ["clients", "projects"]
Constructors
Select | |
type ReadRequest = Tree ReadNode #
type MutateRequest = MutateQuery #
Constructors
DbRead ReadRequest | |
DbMutate MutateRequest |
toHeader :: ContentType -> Header #
Convert from ContentType to a full HTTP Header
toMime :: ContentType -> ByteString #
Convert from ContentType to a ByteString representing the mime type