Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module exports the bind
function as >>=
so that it can be used in
conjuction with the QualifiedDo
language extension to write plans using do
syntax like so:
{-# LANGUAGE QualifiedDo #-} module MyModule where import qualified Orville.PostgreSQL.Plan.Syntax as PlanSyntax data FooFamily = FooFamily { foo :: Foo , children :: [FooChildren] , pets :: [FooPets] } findFooFamily = PlanSyntax.do $ fooHeader <- Plan.findOne fooTable fooIdField fooChildren <- Plan.findAll fooChildTable fooIdField fooPets <- Plan.findAll fooPetTable fooIdField FooFamily <$> Plan.use fooHeader <*> Plan.use fooChildren <*> Plan.use fooPets
Since: 1.0.0.0