| Portability | Not portable |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
Servant.DB.PostgreSQL.Context
Description
- data Argument a
- = ArgVariadic (Variadic a)
- | ArgDefault (Maybe a)
- | ArgSimple a
- data QueryArg r = r a => QueryArg (Argument a)
- data QueryContext r = QueryContext {
- queryArguments :: !(Seq (Maybe Text, QueryArg r))
- querySchema :: !(Maybe Text)
- queryVoid :: !Bool
- newQueryContext :: QueryContext r
- addQueryArgument :: r a => Maybe Text -> Argument a -> QueryContext r -> QueryContext r
- queryStoredFunction :: forall r. r ~ ToField => Text -> QueryContext r -> SqlBuilder
Documentation
Captures special cases of stored function arguments
Constructors
| ArgVariadic (Variadic a) | Variadic argument has uncommon call syntax |
| ArgDefault (Maybe a) | Default keyword |
| ArgSimple a | Common case |
Encapsulated argument that can be serialized into field or type checked
The type parameter can be ToField for query generation or Typeable for
type checking of DB signature.
data QueryContext r Source #
Catches intermediate parameters for query
Constructors
| QueryContext | |
Fields
| |
newQueryContext :: QueryContext r Source #
New empty query context
Arguments
| :: r a | |
| => Maybe Text | Name of argument, |
| -> Argument a | Value of argument |
| -> QueryContext r | Context |
| -> QueryContext r | New context with the argument |
Add new argument to query context
Arguments
| :: r ~ ToField | |
| => Text | Name of function |
| -> QueryContext r | Context |
| -> SqlBuilder |
Construct query that calls DB stored function