Copyright | (c) Eitan Chatav 2019 |
---|---|
Maintainer | [email protected] |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Squeal.PostgreSQL.Session.Statement
Description
A top-level Statement
type wraps a Query
or Manipulation
together with an EncodeParams
and a DecodeRow
.
Synopsis
- data Statement db x y where
- Manipulation :: (All (OidOfNull db) params, SListI row) => EncodeParams db params x -> DecodeRow row y -> Manipulation '[] db params row -> Statement db x y
- Query :: (All (OidOfNull db) params, SListI row) => EncodeParams db params x -> DecodeRow row y -> Query '[] '[] db params row -> Statement db x y
- query :: (GenericParams db params x xs, GenericRow row y ys) => Query '[] '[] db params row -> Statement db x y
- manipulation :: (GenericParams db params x xs, GenericRow row y ys) => Manipulation '[] db params row -> Statement db x y
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 |
Instances
Profunctor (Statement db) Source # | |
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 # | |
RenderSQL (Statement db x y) Source # | |
Defined in Squeal.PostgreSQL.Session.Statement Methods renderSQL :: Statement db x y -> ByteString Source # |
Arguments
:: (GenericParams db params x xs, GenericRow row y ys) | |
=> Query '[] '[] db params row | |
-> Statement db x y |
Smart constructor for a structured query language statement
Arguments
:: (GenericParams db params x xs, GenericRow row y ys) | |
=> Manipulation '[] db params row |
|
-> Statement db x y |
Smart constructor for a data manipulation language statement