on 13eac89 help sign in
rel8/src/Rel8/Query/Values.hs
24 lines 510 B history raw
1{-# language FlexibleContexts #-}
3module Rel8.Query.Values
4 ( values
5 )
6where
8-- base
9import Data.Foldable ( toList )
10import Prelude
12-- opaleye
13import qualified Opaleye.Values as Opaleye
15-- rel8
16import {-# SOURCE #-} Rel8.Query ( Query )
17import Rel8.Query.Opaleye ( fromOpaleye )
18import Rel8.Table ( Table )
19import Rel8.Table.Opaleye ( valuesspec )
20import Rel8.Schema.Context ( DB )
23values :: (Table DB a, Foldable f) => f a -> Query a
24values = fromOpaleye . Opaleye.valuesExplicit valuesspec . toList