preql-0.2: safe PostgreSQL queries using Quasiquoters

Safe HaskellNone
LanguageHaskell2010

Preql.Wire.Internal

Description

The types in this module have invariants which cannot be checked if their constructors are in scope. Preql.Wire exports the type names only.

Synopsis

Documentation

newtype Query Source #

The IsString instance does no validation; the limited instances discourage directly manipulating strings, with the high risk of SQL injection.

Constructors

Query ByteString 
Instances
Show Query Source # 
Instance details

Defined in Preql.Wire.Internal

Methods

showsPrec :: Int -> Query -> ShowS #

show :: Query -> String #

showList :: [Query] -> ShowS #

IsString Query Source # 
Instance details

Defined in Preql.Wire.Internal

Methods

fromString :: String -> Query #

data RowDecoder a Source #

RowDecoder is Applicative but not Monad so that we can assemble all of the OIDs before we read any of the field data sent by Postgresj.

Constructors

RowDecoder [Oid] (InternalDecoder a) 
Instances
Functor RowDecoder Source # 
Instance details

Defined in Preql.Wire.Internal

Methods

fmap :: (a -> b) -> RowDecoder a -> RowDecoder b #

(<$) :: a -> RowDecoder b -> RowDecoder a #

Applicative RowDecoder Source # 
Instance details

Defined in Preql.Wire.Internal

Methods

pure :: a -> RowDecoder a #

(<*>) :: RowDecoder (a -> b) -> RowDecoder a -> RowDecoder b #

liftA2 :: (a -> b -> c) -> RowDecoder a -> RowDecoder b -> RowDecoder c #

(*>) :: RowDecoder a -> RowDecoder b -> RowDecoder b #

(<*) :: RowDecoder a -> RowDecoder b -> RowDecoder a #

data DecoderState Source #

Constructors

DecoderState 

Fields