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

Opaleye.Values

Synopsis

Documentation

values :: Default Valuesspec fields fields => [fields] -> Select fields Source #

values implements Postgres's VALUES construct and allows you to create a SELECT that consists of the given rows.

Example type specialization:

values :: [(Field a, Field b)] -> Select (Field a, Field b)

Assuming the makeAdaptorAndInstance splice has been run for the product type Foo:

values :: [Foo (Field a) (Field b) (Field c)] -> S.Select (Foo (Field a) (Field b) (Field c))

Explicit versions

valuesExplicit :: Valuesspec fields fields' -> [fields] -> Select fields' Source #

Adaptors

data Valuesspec columns columns' Source #

Instances

Instances details
Profunctor Valuesspec Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

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

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

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

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

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

ProductProfunctor Valuesspec Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

purePP :: b -> Valuesspec a b #

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

empty :: Valuesspec () () #

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

IsSqlType a => Default Valuesspec (Column a) (Column a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

def :: Valuesspec (Column a) (Column a) #

Default Valuesspec a b => Default Valuesspec (MaybeFields a) (MaybeFields b) Source # 
Instance details

Defined in Opaleye.Internal.MaybeFields

Functor (Valuesspec a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

fmap :: (a0 -> b) -> Valuesspec a a0 -> Valuesspec a b #

(<$) :: a0 -> Valuesspec a b -> Valuesspec a a0 #

Applicative (Valuesspec a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

pure :: a0 -> Valuesspec a a0 #

(<*>) :: Valuesspec a (a0 -> b) -> Valuesspec a a0 -> Valuesspec a b #

liftA2 :: (a0 -> b -> c) -> Valuesspec a a0 -> Valuesspec a b -> Valuesspec a c #

(*>) :: Valuesspec a a0 -> Valuesspec a b -> Valuesspec a b #

(<*) :: Valuesspec a a0 -> Valuesspec a b -> Valuesspec a a0 #

Deprecated versions

valuesSafe :: Default Valuesspec fields fields => [fields] -> Select fields Source #

Use values instead. Will be deprecated in 0.8.

valuesSafeExplicit :: Valuesspec fields fields' -> [fields] -> Select fields' Source #

Use valuesExplicit instead. Will be deprecated in 0.8.

valuesUnsafe :: (Default ValuesspecUnsafe fields fields, Default Unpackspec fields fields) => [fields] -> Select fields Source #

Do not use. Will be deprecated in 0.8.

valuesUnsafeExplicit :: Unpackspec fields fields' -> ValuesspecUnsafe fields fields' -> [fields] -> Select fields' Source #

Do not use. Will be deprecated in 0.8.