{-# language FlexibleContexts #-}
module Rel8.Query.Values
( values
)
where
import Data.Foldable ( toList )
import Prelude
import qualified Opaleye.Values as Opaleye
import Rel8.Expr ( Expr )
import {-# SOURCE #-} Rel8.Query ( Query )
import Rel8.Query.Opaleye ( fromOpaleye )
import Rel8.Table ( Table )
import Rel8.Table.Opaleye ( valuesspec )
values :: (Table Expr a, Foldable f) => f a -> Query a
values :: forall a (f :: * -> *).
(Table Expr a, Foldable f) =>
f a -> Query a
values = forall a. Select a -> Query a
fromOpaleye forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall fields fields'.
Valuesspec fields fields' -> [fields] -> Select fields'
Opaleye.valuesExplicit forall a. Table Expr a => Valuesspec a a
valuesspec forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (t :: * -> *) a. Foldable t => t a -> [a]
toList