Copyright | (c) Eitan Chatav 2019 |
---|---|
Maintainer | eitan@morphism.tech |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
optional expressions
Default
data Optional (expr :: k -> Type) (ty :: (Optionality, k)) where Source #
Optional
is either Default
or Set
ting of a value,
parameterized by an appropriate Optionality
.
Default :: Optional expr ('Def :=> ty) | Use the |
Set :: expr ty -> Optional expr (def :=> ty) |
|
Instances
(forall (x :: k). RenderSQL (expr x)) => RenderSQL (Optional expr ty) Source # | |
Defined in Squeal.PostgreSQL.Expression.Default renderSQL :: Optional expr ty -> ByteString Source # | |
(KnownSymbol col, InlineParam x ty) => InlineColumn (col ::: Optional I ('Def :=> x)) (col ::: ('Def :=> ty)) Source # | |
Defined in Squeal.PostgreSQL.Expression.Inline |
mapOptional :: (expr x -> expr y) -> Optional expr (def :=> x) -> Optional expr (def :=> y) Source #
Map a function over an Optional
expression.
pattern NotDefault :: ty -> Optional I ('Def :=> ty) Source #
NotDefault
pattern analagous to Just
.