opaleye-0.6.7000.0: An SQL-generating DSL targeting PostgreSQL

Safe HaskellNone
LanguageHaskell2010

Opaleye.QueryArr

Description

Query and QueryArr are the composable units of database querying that are used in Opaleye.

Synopsis

Documentation

type Query = QueryArr () Source #

A Postgres query, i.e. some functionality that can run via SQL and produce a collection of rows.

Query a is analogous to a Haskell value [a].

data QueryArr a b Source #

QueryArr a b is analogous to a Haskell function a -> [b].

Instances

Arrow QueryArr Source # 

Methods

arr :: (b -> c) -> QueryArr b c #

first :: QueryArr b c -> QueryArr (b, d) (c, d) #

second :: QueryArr b c -> QueryArr (d, b) (d, c) #

(***) :: QueryArr b c -> QueryArr b' c' -> QueryArr (b, b') (c, c') #

(&&&) :: QueryArr b c -> QueryArr b c' -> QueryArr b (c, c') #

ArrowChoice QueryArr Source # 

Methods

left :: QueryArr b c -> QueryArr (Either b d) (Either c d) #

right :: QueryArr b c -> QueryArr (Either d b) (Either d c) #

(+++) :: QueryArr b c -> QueryArr b' c' -> QueryArr (Either b b') (Either c c') #

(|||) :: QueryArr b d -> QueryArr c d -> QueryArr (Either b c) d #

Profunctor QueryArr Source # 

Methods

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

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

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

(#.) :: Coercible * c b => (b -> c) -> QueryArr a b -> QueryArr a c #

(.#) :: Coercible * b a => QueryArr b c -> (a -> b) -> QueryArr a c #

ProductProfunctor QueryArr Source # 

Methods

purePP :: b -> QueryArr a b #

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

empty :: QueryArr () () #

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

Functor (QueryArr a) Source # 

Methods

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

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

Applicative (QueryArr a) Source # 

Methods

pure :: a -> QueryArr a a #

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

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

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

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

Category * QueryArr Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #