opaleye-0.5.2.2: An SQL-generating DSL targeting PostgreSQL

Safe HaskellNone
LanguageHaskell2010

Opaleye.Internal.QueryArr

Synopsis

Documentation

newtype QueryArr a b Source #

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

Constructors

QueryArr ((a, PrimQuery, Tag) -> (b, PrimQuery, Tag)) 

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') #

ProductProfunctor QueryArr Source # 

Methods

empty :: QueryArr () () #

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

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 #

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 #

(*>) :: 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 #

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].

simpleQueryArr :: ((a, Tag) -> (b, PrimQuery, Tag)) -> QueryArr a b Source #

first3 :: (a1 -> b) -> (a1, a2, a3) -> (b, a2, a3) Source #