squeal-postgresql-0.8.0.0: Squeal PostgreSQL Library
Copyright(c) Eitan Chatav 2019
Maintainereitan@morphism.tech
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Squeal.PostgreSQL.Session.Statement

Description

A top-level Statement type wraps a Query or Manipulation together with an EncodeParams and a DecodeRow.

Synopsis

Documentation

data Statement db x y where Source #

A Statement consists of a Manipulation or a Query that can be run in a MonadPQ.

Constructors

Manipulation

Constructor for a data manipulation language statement

Fields

Query

Constructor for a structured query language statement

Fields

Instances

Instances details
Profunctor (Statement db) Source # 
Instance details

Defined in Squeal.PostgreSQL.Session.Statement

Methods

dimap :: (a -> b) -> (c -> d) -> Statement db b c -> Statement db a d #

lmap :: (a -> b) -> Statement db b c -> Statement db a c #

rmap :: (b -> c) -> Statement db a b -> Statement db a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Statement db a b -> Statement db a c #

(.#) :: forall a b c q. Coercible b a => Statement db b c -> q a b -> Statement db a c #

Functor (Statement db x) Source # 
Instance details

Defined in Squeal.PostgreSQL.Session.Statement

Methods

fmap :: (a -> b) -> Statement db x a -> Statement db x b #

(<$) :: a -> Statement db x b -> Statement db x a #

RenderSQL (Statement db x y) Source # 
Instance details

Defined in Squeal.PostgreSQL.Session.Statement

Methods

renderSQL :: Statement db x y -> ByteString Source #

query Source #

Arguments

:: (GenericParams db params x xs, GenericRow row y ys) 
=> Query '[] '[] db params row

select, values, ...

-> Statement db x y 

Smart constructor for a structured query language statement

manipulation Source #

Arguments

:: (GenericParams db params x xs, GenericRow row y ys) 
=> Manipulation '[] db params row

insertInto, update, or deleteFrom, ...

-> Statement db x y 

Smart constructor for a data manipulation language statement