opaleye-0.7.3.0: An SQL-generating DSL targeting PostgreSQL
Safe HaskellNone
LanguageHaskell2010

Opaleye.Internal.RunQueryExternal

Synopsis

Documentation

runQuery :: Default FromFields fields haskells => Connection -> Select fields -> IO [haskells] Source #

Deprecated: Use runSelect instead. runQuery will be removed in 0.8.

runQueryFold :: Default FromFields fields haskells => Connection -> Select fields -> b -> (b -> haskells -> IO b) -> IO b Source #

Deprecated: Use runSelectFold instead. runQueryFold will be removed in 0.8.

queryRunnerColumn :: (Column a' -> Column a) -> (b -> b') -> FromField a b -> FromField a' b' Source #

Deprecated: Use unsafeFromField instead. queryRunnerColumn will be removed in 0.8.

runQueryExplicit :: FromFields fields haskells -> Connection -> Select fields -> IO [haskells] Source #

Deprecated: Use runSelectExplict instead. Will be removed in 0.8.

runQueryFoldExplicit :: FromFields fields haskells -> Connection -> Select fields -> b -> (b -> haskells -> IO b) -> IO b Source #

Deprecated: Use runSelectFoldExplict instead. Will be deprecated in 0.8.

declareCursor :: Default FromFields fields haskells => Connection -> Select fields -> IO (Cursor haskells) Source #

Deprecated: Use declareCursor instead. Will be removed in 0.8.

declareCursorExplicit :: FromFields fields haskells -> Connection -> Select fields -> IO (Cursor haskells) Source #

Deprecated: Use declareCursorExplicit instead. Will be removed in 0.8.

closeCursor :: Cursor fields -> IO () Source #

Deprecated: Use closeCursor instead. Will be removed in 0.8.

foldForward :: Cursor haskells -> Int -> (a -> haskells -> IO a) -> a -> IO (Either a a) Source #

Deprecated: Use foldForward instead. Will be removed in 0.8.

Datatypes

data Cursor haskells Source #

Cursor within a transaction.

data FromFields columns haskells Source #

A FromFields specifies how to convert Postgres values (fields) into Haskell values (haskells). Most likely you will never need to create on of these or handle one directly. It will be provided for you by the Default FromFields instance.

"FromFields fields haskells" corresponds to postgresql-simple's "RowParser haskells". "Default FromFields columns haskells" corresponds to postgresql-simple's "FromRow haskells".

Instances

Instances details
Profunctor FromFields Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

dimap :: (a -> b) -> (c -> d) -> FromFields b c -> FromFields a d #

lmap :: (a -> b) -> FromFields b c -> FromFields a c #

rmap :: (b -> c) -> FromFields a b -> FromFields a c #

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

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

ProductProfunctor FromFields Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

purePP :: b -> FromFields a b #

(****) :: FromFields a (b -> c) -> FromFields a b -> FromFields a c #

empty :: FromFields () () #

(***!) :: FromFields a b -> FromFields a' b' -> FromFields (a, a') (b, b') #

SumProfunctor FromFields Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

(+++!) :: FromFields a b -> FromFields a' b' -> FromFields (Either a a') (Either b b') #

DefaultFromField a b => Default FromFields (Column a) b Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

def :: FromFields (Column a) b #

Default FromFields fields haskells => Default FromFields (MaybeFields fields) (Maybe haskells) Source # 
Instance details

Defined in Opaleye.Internal.MaybeFields

Methods

def :: FromFields (MaybeFields fields) (Maybe haskells) #

Functor (FromFields c) Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

fmap :: (a -> b) -> FromFields c a -> FromFields c b #

(<$) :: a -> FromFields c b -> FromFields c a #

Applicative (FromFields c) Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

pure :: a -> FromFields c a #

(<*>) :: FromFields c (a -> b) -> FromFields c a -> FromFields c b #

liftA2 :: (a -> b -> c0) -> FromFields c a -> FromFields c b -> FromFields c c0 #

(*>) :: FromFields c a -> FromFields c b -> FromFields c b #

(<*) :: FromFields c a -> FromFields c b -> FromFields c a #

Default (Inferrable FromField) a b => Default (Inferrable FromFields) (Column a) b Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromFields (Column a) b #

(Default (Inferrable FromField) a b, Maybe b ~ maybe_b) => Default (Inferrable FromFields) (Column (Nullable a)) maybe_b Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromFields (Column (Nullable a)) maybe_b #

(Default (Inferrable FromFields) fields haskells, Maybe haskells ~ maybe_haskells) => Default (Inferrable FromFields) (MaybeFields fields) maybe_haskells Source # 
Instance details

Defined in Opaleye.Internal.MaybeFields

Methods

def :: Inferrable FromFields (MaybeFields fields) maybe_haskells #

data FromField pgType haskellType Source #

A FromField sqlType haskellType encodes how to turn a value of Postgres type sqlType into a value of Haskell type haskellType. For example a value of type FromField SqlText String encodes how to turn a SqlText result from the database into a Haskell String.

"FromField sqlType haskellType" corresponds to postgresql-simple's "FieldParser haskellType".

Instances

Instances details
DefaultFromField sqlType haskellType => Default FromField sqlType haskellType Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

def :: FromField sqlType haskellType #

Functor (FromField u) Source # 
Instance details

Defined in Opaleye.Internal.RunQuery

Methods

fmap :: (a -> b) -> FromField u a -> FromField u b #

(<$) :: a -> FromField u b -> FromField u a #

bytestring ~ ByteString => Default (Inferrable FromField) SqlBytea bytestring Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromField SqlBytea bytestring #

cttext ~ CI Text => Default (Inferrable FromField) SqlCitext cttext Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

uuid ~ UUID => Default (Inferrable FromField) SqlUuid uuid Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

localtime ~ LocalTime => Default (Inferrable FromField) SqlTimestamp localtime Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromField SqlTimestamp localtime #

timeofday ~ TimeOfDay => Default (Inferrable FromField) SqlTime timeofday Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromField SqlTime timeofday #

text ~ Text => Default (Inferrable FromField) SqlText text Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

scientific ~ Scientific => Default (Inferrable FromField) SqlNumeric scientific Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromField SqlNumeric scientific #

int ~ Int => Default (Inferrable FromField) SqlInt4 int Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

int64 ~ Int64 => Default (Inferrable FromField) SqlInt8 int64 Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromField SqlInt8 int64 #

double ~ Double => Default (Inferrable FromField) SqlFloat8 double Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

day ~ Day => Default (Inferrable FromField) SqlDate day Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

bool ~ Bool => Default (Inferrable FromField) SqlBool bool Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

(Typeable h, Default (Inferrable FromField) f h, hs ~ [h]) => Default (Inferrable FromField) (SqlArray f) hs Source # 
Instance details

Defined in Opaleye.Internal.Inferrable

Methods

def :: Inferrable FromField (SqlArray f) hs #

Creating new QueryRunnerColumns

fieldQueryRunnerColumn :: FromField haskell => FromField pgType haskell Source #