| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rel8.Internal.Query.List
Synopsis
- many :: Table Expr a => Query a -> Query (ListTable Expr a)
- some :: Table Expr a => Query a -> Query (NonEmptyTable Expr a)
- manyExpr :: Sql DBType a => Query (Expr a) -> Query (Expr [a])
- someExpr :: Sql DBType a => Query (Expr a) -> Query (Expr (NonEmpty a))
- catListTable :: Table Expr a => ListTable Expr a -> Query a
- catNonEmptyTable :: Table Expr a => NonEmptyTable Expr a -> Query a
- catList :: Sql DBType a => Expr [a] -> Query (Expr a)
- catNonEmpty :: Sql DBType a => Expr (NonEmpty a) -> Query (Expr a)
Documentation
many :: Table Expr a => Query a -> Query (ListTable Expr a) Source #
Aggregate a Query into a ListTable. If the supplied query returns 0
rows, this function will produce a Query that returns one row containing
the empty ListTable. If the supplied Query does return rows, many will
return exactly one row, with a ListTable collecting all returned rows.
many is analogous to many from
Control.Applicative.
some :: Table Expr a => Query a -> Query (NonEmptyTable Expr a) Source #
Aggregate a Query into a NonEmptyTable. If the supplied query returns
0 rows, this function will produce a Query that is empty - that is, will
produce zero NonEmptyTables. If the supplied Query does return rows,
some will return exactly one row, with a NonEmptyTable collecting all
returned rows.
some is analogous to some from
Control.Applicative.
manyExpr :: Sql DBType a => Query (Expr a) -> Query (Expr [a]) Source #
A version of many specialised to single expressions.
someExpr :: Sql DBType a => Query (Expr a) -> Query (Expr (NonEmpty a)) Source #
A version of some specialised to single expressions.
catNonEmptyTable :: Table Expr a => NonEmptyTable Expr a -> Query a Source #
Expand a NonEmptyTable into a Query, where each row in the query is an
element of the given NonEmptyTable.
catNonEmptyTable is an inverse to some.