Copyright | (c) Eitan Chatav 2019 |
---|---|
Maintainer | eitan@morphism.tech |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Literal expressions
Documentation
class Literal hask where Source #
The Literal
class allows embedding a Haskell value directly
as an Expression
using literal
.
>>>
printSQL (literal 'a')
E'a'
>>>
printSQL (literal (1 :: Double))
1.0
>>>
printSQL (literal (Json [1 :: Double, 2]))
('[1.0,2.0]' :: json)
>>>
printSQL (literal (Enumerated GT))
'GT'
Instances
Literal Bool Source # | |
Literal Char Source # | |
Literal Double Source # | |
Literal Float Source # | |
Literal Int16 Source # | |
Literal Int32 Source # | |
Literal Int64 Source # | |
Literal Text Source # | |
Literal Text Source # | |
Literal String Source # | |
ToParam (Enumerated enum) (PG (Enumerated enum)) => Literal (Enumerated enum) Source # | |
Defined in Squeal.PostgreSQL.Expression.Literal literal :: Enumerated enum -> Expr (null (PG (Enumerated enum))) Source # | |
ToJSON hask => Literal (Jsonb hask) Source # | |
ToJSON hask => Literal (Json hask) Source # | |