Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
type Synt dbt = Sql92ExpressionValueSyntax ( Sql92SelectTableExpressionSyntax ( Sql92SelectSelectTableSyntax ( Sql92SelectSyntax ( BeamSqlBackendSyntax dbt)))) Source #
data BeamEffect dbt r where Source #
AddRowsInBatches :: BeamableDb dbt table => Int -> DatabaseEntity dbt db ( TableEntity table) -> [table Identity ] -> BeamEffect dbt () | |
AddRows :: BeamableDb dbt table => SqlInsert dbt table -> BeamEffect dbt () | |
UpdateRows :: Beamable table => SqlUpdate dbt table -> BeamEffect dbt () | |
DeleteRows :: Beamable table => SqlDelete dbt table -> BeamEffect dbt () | |
SelectList :: FromBackendRow dbt a => SqlSelect dbt a -> BeamEffect dbt [a] | |
SelectPage :: ( FromBackendRow dbt a, HasSqlValueSyntax ( Synt dbt) a, HasQBuilder dbt) => PageQuery a -> Q dbt db BeamThreadingArg ( QExpr dbt BeamThreadingArg a) -> BeamEffect dbt ( Page a) |
Select using Seek Pagination. |
SelectOne :: FromBackendRow dbt a => SqlSelect dbt a -> BeamEffect dbt ( Maybe a) | |
Combined :: [ BeamEffect dbt ()] -> BeamEffect dbt () |
Instances
Semigroup ( BeamEffect dbt ()) Source # | |
Defined in Control.Monad.Freer.Extras.Beam.Effects (<>) :: BeamEffect dbt () -> BeamEffect dbt () -> BeamEffect dbt () Source # sconcat :: NonEmpty ( BeamEffect dbt ()) -> BeamEffect dbt () Source # stimes :: Integral b => b -> BeamEffect dbt () -> BeamEffect dbt () Source # |
|
Monoid ( BeamEffect dbt ()) Source # | |
Defined in Control.Monad.Freer.Extras.Beam.Effects mempty :: BeamEffect dbt () Source # mappend :: BeamEffect dbt () -> BeamEffect dbt () -> BeamEffect dbt () Source # mconcat :: [ BeamEffect dbt ()] -> BeamEffect dbt () Source # |
addRowsInBatches :: forall dbt table db effs. ( BeamableDb dbt table, Member ( BeamEffect dbt) effs) => Int -> DatabaseEntity dbt db ( TableEntity table) -> [table Identity ] -> Eff effs () Source #
addRows :: forall dbt table effs. ( BeamableDb dbt table, Member ( BeamEffect dbt) effs) => SqlInsert dbt table -> Eff effs () Source #
updateRows :: forall dbt table effs. ( Beamable table, Member ( BeamEffect dbt) effs) => SqlUpdate dbt table -> Eff effs () Source #
deleteRows :: forall dbt table effs. ( Beamable table, Member ( BeamEffect dbt) effs) => SqlDelete dbt table -> Eff effs () Source #
selectList :: forall dbt a effs. ( FromBackendRow dbt a, Member ( BeamEffect dbt) effs) => SqlSelect dbt a -> Eff effs [a] Source #
selectPage :: forall dbt a db effs. ( FromBackendRow dbt a, HasSqlValueSyntax ( Synt dbt) a, Member ( BeamEffect dbt) effs, HasQBuilder dbt) => PageQuery a -> Q dbt db BeamThreadingArg ( QExpr dbt BeamThreadingArg a) -> Eff effs ( Page a) Source #
selectOne :: forall dbt a effs. ( FromBackendRow dbt a, Member ( BeamEffect dbt) effs) => SqlSelect dbt a -> Eff effs ( Maybe a) Source #
combined :: forall dbt effs. Member ( BeamEffect dbt) effs => [ BeamEffect dbt ()] -> Eff effs () Source #
handleBeam :: forall dbt (dbM :: Type -> Type ) effs. ( BeamSqlBackend dbt, MonadBeam dbt dbM, BeamHasInsertOnConflict dbt) => (Trace IO BeamLog -> dbM ~> Eff effs) -> Trace IO BeamLog -> BeamEffect dbt ~> Eff effs Source #