| Copyright | (c) 2016 Al Zohali |
|---|---|
| License | BSD3 |
| Maintainer | Al Zohali <zohl@fmap.me> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Database.PostgreSQL.Simple.Bind.Representation
Description
An algebraic data type that (partially) represents function declaration based on PostgreSQL documentation.
- data PGFunction = PGFunction String String [PGArgument] PGResult
- data PGArgument = PGArgument String String Bool
- data PGColumn = PGColumn String String
- data PGResult
- data PostgresBindException
- parsePGFunction :: MonadThrow m => Text -> m PGFunction
Documentation
data PGFunction Source #
Representation of a PostrgeSQL function signature (schema, name, arguments, result).
Constructors
| PGFunction String String [PGArgument] PGResult |
Instances
data PGArgument Source #
Representation of a function's argument (name, type, is optional).
Constructors
| PGArgument String String Bool |
Instances
Representation of a resultant's column (name, type).
Representation of a function's return value.
data PostgresBindException Source #
The exception is thrown when something goes wrong with this package.
Constructors
| ParserFailed String | Thrown when parser fails to process a function declaration. Arguments of the constructor: error message from the parser. |
| DefaultValueNotFound String | Thrown when |
parsePGFunction :: MonadThrow m => Text -> m PGFunction Source #
Takes PostgreSQL function signature and represent it as an algebraic data type.