@@ -20,6 +20,14 @@ import Rel8.Table.Maybe ( maybeTable )
2020import Rel8.Table.NonEmpty ( NonEmptyTable )
2121
2222
23+-- | Aggregate a 'Query' into a 'NonEmptyTable'. If the supplied query returns
24+-- 0 rows, this function will produce a 'Query' that is empty - that is, will
25+-- produce zero @NonEmptyTable@s. If the supplied @Query@ does return rows,
26+-- @some@ will return exactly one row, with a @NonEmptyTable@ collecting all
27+-- returned rows.
28+--
29+-- @some@ is analogous to 'Control.Applicative.some' from
30+-- @Control.Applicative@.
2331some :: Table DB a => Query a -> Query (NonEmptyTable a)
2432some = aggregate . fmap nonEmptyAgg
2533