{-# LANGUAGE FlexibleContexts #-}
module Opaleye.Values(
values,
valuesExplicit,
V.Valuesspec,
V.ValuesspecSafe,
V.valuesspecField,
valuesSafe,
valuesSafeExplicit,
valuesUnsafe,
valuesUnsafeExplicit,
) where
import qualified Opaleye.Internal.QueryArr as Q
import Opaleye.Internal.Values as V
import qualified Opaleye.Internal.Unpackspec as U
import qualified Opaleye.Select as S
import Data.Profunctor.Product.Default (Default, def)
valuesUnsafe :: (Default V.ValuesspecUnsafe fields fields,
Default U.Unpackspec fields fields) =>
[fields] -> S.Select fields
valuesUnsafe :: [fields] -> Select fields
valuesUnsafe = Unpackspec fields fields
-> ValuesspecUnsafe fields fields -> [fields] -> Select fields
forall fields fields'.
Unpackspec fields fields'
-> ValuesspecUnsafe fields fields' -> [fields] -> Select fields'
valuesUnsafeExplicit Unpackspec fields fields
forall (p :: * -> * -> *) a b. Default p a b => p a b
def ValuesspecUnsafe fields fields
forall (p :: * -> * -> *) a b. Default p a b => p a b
def
valuesUnsafeExplicit :: U.Unpackspec fields fields'
-> V.ValuesspecUnsafe fields fields'
-> [fields] -> S.Select fields'
valuesUnsafeExplicit :: Unpackspec fields fields'
-> ValuesspecUnsafe fields fields' -> [fields] -> Select fields'
valuesUnsafeExplicit Unpackspec fields fields'
unpack ValuesspecUnsafe fields fields'
valuesspec [fields]
fields =
(((), Tag) -> (fields', PrimQuery, Tag)) -> Select fields'
forall a b. ((a, Tag) -> (b, PrimQuery, Tag)) -> QueryArr a b
Q.productQueryArr (Unpackspec fields fields'
-> ValuesspecUnsafe fields fields'
-> [fields]
-> ((), Tag)
-> (fields', PrimQuery, Tag)
forall columns columns'.
Unpackspec columns columns'
-> ValuesspecUnsafe columns columns'
-> [columns]
-> ((), Tag)
-> (columns', PrimQuery, Tag)
V.valuesU Unpackspec fields fields'
unpack ValuesspecUnsafe fields fields'
valuesspec [fields]
fields)
values :: Default V.Valuesspec fields fields
=> [fields] -> S.Select fields
values :: [fields] -> Select fields
values = Valuesspec fields fields -> [fields] -> Select fields
forall fields fields'.
Valuesspec fields fields' -> [fields] -> Select fields'
valuesExplicit Valuesspec fields fields
forall (p :: * -> * -> *) a b. Default p a b => p a b
def
valuesExplicit :: V.Valuesspec fields fields'
-> [fields] -> S.Select fields'
valuesExplicit :: Valuesspec fields fields' -> [fields] -> Select fields'
valuesExplicit Valuesspec fields fields'
valuesspec [fields]
fields =
(((), Tag) -> (fields', PrimQuery, Tag)) -> Select fields'
forall a b. ((a, Tag) -> (b, PrimQuery, Tag)) -> QueryArr a b
Q.productQueryArr (Valuesspec fields fields'
-> [fields] -> ((), Tag) -> (fields', PrimQuery, Tag)
forall columns columns'.
Valuesspec columns columns'
-> [columns] -> ((), Tag) -> (columns', PrimQuery, Tag)
V.valuesUSafe Valuesspec fields fields'
valuesspec [fields]
fields)
valuesSafe :: Default V.Valuesspec fields fields
=> [fields] -> S.Select fields
valuesSafe :: [fields] -> Select fields
valuesSafe = [fields] -> Select fields
forall fields.
Default Valuesspec fields fields =>
[fields] -> Select fields
values
valuesSafeExplicit :: V.Valuesspec fields fields'
-> [fields] -> S.Select fields'
valuesSafeExplicit :: Valuesspec fields fields' -> [fields] -> Select fields'
valuesSafeExplicit = Valuesspec fields fields' -> [fields] -> Select fields'
forall fields fields'.
Valuesspec fields fields' -> [fields] -> Select fields'
valuesExplicit