Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- with :: Default Unpackspec a a => Select a -> (Select a -> Select b) -> Select b
- withMaterialized :: Default Unpackspec a a => Select a -> (Select a -> Select b) -> Select b
- withRecursive :: Default Binaryspec a a => Select a -> (a -> Select a) -> Select a
- withRecursiveDistinct :: Default Binaryspec a a => Select a -> (a -> Select a) -> Select a
- withExplicit :: Unpackspec a a -> Select a -> (Select a -> Select b) -> Select b
- withMaterializedExplicit :: Unpackspec a a -> Select a -> (Select a -> Select b) -> Select b
- withRecursiveExplicit :: Binaryspec a a -> Select a -> (a -> Select a) -> Select a
- withRecursiveDistinctExplicit :: Binaryspec a a -> Select a -> (a -> Select a) -> Select a
Documentation
withMaterialized :: Default Unpackspec a a => Select a -> (Select a -> Select b) -> Select b Source #
withRecursive :: Default Binaryspec a a => Select a -> (a -> Select a) -> Select a Source #
Denotionally, withRecursive s f
is the smallest set of rows r
such
that
r == s `unionAll
` (r >>= f)
Operationally, withRecursive s f
takes each row in an initial set s
and
supplies it to f
, resulting in a new generation of rows which are added
to the result set. Each row from this new generation is then fed back to
f
, and this process is repeated until a generation comes along for which
f
returns an empty set for each row therein.
withRecursiveDistinct :: Default Binaryspec a a => Select a -> (a -> Select a) -> Select a Source #
Denotationally, withRecursiveDistinct s f
is the smallest set of rows
r
such that
r == s `union
` (r >>= f)
Operationally, withRecursiveDistinct s f
takes each distinct row in an
initial set s
and supplies it to f
, resulting in a new generation of
rows. Any rows returned by f
that already exist in the result set are not
considered part of this new generation by withRecursiveDistinct
(in
contrast to withRecursive
). This new generation is then added to the
result set, and each row therein is then fed back to f
, and this process
is repeated until a generation comes along for which f
returns no rows
that don't already exist in the result set.
Explicit versions
withExplicit :: Unpackspec a a -> Select a -> (Select a -> Select b) -> Select b Source #
withMaterializedExplicit :: Unpackspec a a -> Select a -> (Select a -> Select b) -> Select b Source #
withRecursiveExplicit :: Binaryspec a a -> Select a -> (a -> Select a) -> Select a Source #
withRecursiveDistinctExplicit :: Binaryspec a a -> Select a -> (a -> Select a) -> Select a Source #