squeal-postgresql-0.5.2.0: Squeal PostgreSQL Library

Copyright(c) Eitan Chatav 2019
Maintainereitan@morphism.tech
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Squeal.PostgreSQL.Expression.Literal

Description

Literal expressions

Synopsis

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'

Methods

literal :: hask -> Expr (null (PG hask)) Source #

Instances
Literal Bool Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Bool -> Expr (null (PG Bool)) Source #

Literal Char Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Char -> Expr (null (PG Char)) Source #

Literal Double Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Double -> Expr (null (PG Double)) Source #

Literal Float Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Float -> Expr (null (PG Float)) Source #

Literal Int16 Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Int16 -> Expr (null (PG Int16)) Source #

Literal Int32 Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Int32 -> Expr (null (PG Int32)) Source #

Literal Int64 Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Int64 -> Expr (null (PG Int64)) Source #

Literal Text Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Text -> Expr (null (PG Text)) Source #

Literal Text Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Text -> Expr (null (PG Text)) Source #

Literal String Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: String -> Expr (null (PG String)) Source #

ToParam (Enumerated enum) (PG (Enumerated enum)) => Literal (Enumerated enum) Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Enumerated enum -> Expr (null (PG (Enumerated enum))) Source #

ToJSON hask => Literal (Jsonb hask) Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Jsonb hask -> Expr (null (PG (Jsonb hask))) Source #

ToJSON hask => Literal (Json hask) Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression.Literal

Methods

literal :: Json hask -> Expr (null (PG (Json hask))) Source #