Constructors
Instances2Semigroup, Monoid
Semigroup (Recursiveness be)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTEMonoid (Recursiveness be)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTE
:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19
Modulebeam-core-0.11.1.0Haskell2010
Semigroup (Recursiveness be)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTEMonoid (Recursiveness be)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTEMonad in which SELECT statements can be made (via selecting)
and bound to result names for re-use later. This has the advantage
of only computing each result once. In SQL, this is translated to a
common table expression.
Once introduced, results can be re-used in future queries with reuse.
With is also a member of MonadFix for backends that support
recursive CTEs. In this case, you can use mdo or rec notation
(with RecursiveDo enabled) to bind result values (again, using
reuse) even before they're introduced.
See further documentation here.
WithrunWith :: WriterT (Recursiveness be, [BeamSql99BackendCTESyntax be]) (State Int) aMonad (With be db)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTEFunctor (With be db)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTEIsSql99RecursiveCommonTableExpressionSelectSyntax (BeamSqlBackendSelectSyntax be) => MonadFix (With be db)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTEApplicative (With be db)Defined in beam-core-0.11.1.0 · Database.Beam.Query.CTEIntroduce the result of a query as a result in a common table expression. The returned value can be used in future queries by applying reuse.
Introduces the result of a previous selecting (a CTE) into a new query