Document Query

This commit is contained in:
Ollie Charles 2021-03-24 13:17:59 +00:00
parent 8560de9c71
commit eb57de9fa1

View File

@ -23,14 +23,18 @@ import Rel8.Table.Alternative
)
-- | The @Query@ monad allows you to compose a @SELECT@ query. This monad has
-- semantics similar to the list (@[]@) monad.
type Query :: Type -> Type
newtype Query a = Query (Opaleye.Select a)
deriving newtype (Functor, Applicative, Monad)
-- | '<|>:' = 'unionAll'.
instance AltTable Query where
(<|>:) = unionAll
-- | 'emptyTable' = 'values' @[]@.
instance AlternativeTable Query where
emptyTable = values []