freer-extras-0.1.0.0: Useful extensions to simple-freer
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Freer.Extras.Beam

Documentation

newtype BeamError Source #

Constructors

SqlError Text 

Instances

Instances details
Eq BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Show BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Generic BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Associated Types

type Rep BeamError :: Type -> Type Source #

ToJSON BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

FromJSON BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Exception BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Pretty BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Methods

pretty :: BeamError -> Doc ann Source #

prettyList :: [BeamError] -> Doc ann Source #

ToObject BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Methods

toObject :: TracingVerbosity -> BeamError -> Object

textTransformer :: BeamError -> Object -> Text

type Rep BeamError Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

type Rep BeamError = D1 ('MetaData "BeamError" "Control.Monad.Freer.Extras.Beam" "freer-extras-0.1.0.0-CfgIKUimrp7EKG4sAjImSV" 'True) (C1 ('MetaCons "SqlError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype BeamLog Source #

Constructors

SqlLog String 

Instances

Instances details
Eq BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Show BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Generic BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Associated Types

type Rep BeamLog :: Type -> Type Source #

ToJSON BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

FromJSON BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Pretty BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Methods

pretty :: BeamLog -> Doc ann Source #

prettyList :: [BeamLog] -> Doc ann Source #

ToObject BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

Methods

toObject :: TracingVerbosity -> BeamLog -> Object

textTransformer :: BeamLog -> Object -> Text

type Rep BeamLog Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam

type Rep BeamLog = D1 ('MetaData "BeamLog" "Control.Monad.Freer.Extras.Beam" "freer-extras-0.1.0.0-CfgIKUimrp7EKG4sAjImSV" 'True) (C1 ('MetaCons "SqlLog" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

handleBeam :: forall effs. (LastMember IO effs, Member (Reader (Pool Connection)) effs) => Trace IO BeamLog -> BeamEffect ~> Eff effs Source #

runBeam :: forall effs. (LastMember IO effs, Member (Reader (Pool Connection)) effs) => Trace IO BeamLog -> SqliteM ~> Eff effs Source #

combined :: forall effs. Member BeamEffect effs => [BeamEffect ()] -> Eff effs () Source #

selectOne :: forall a. FromBackendRow Sqlite a => forall effs. Member BeamEffect effs => SqlSelect Sqlite a -> Eff effs (Maybe a) Source #

selectList :: forall a. FromBackendRow Sqlite a => forall effs. Member BeamEffect effs => SqlSelect Sqlite a -> Eff effs [a] Source #

deleteRows :: forall (table :: (Type -> Type) -> Type). Beamable table => forall effs. Member BeamEffect effs => SqlDelete Sqlite table -> Eff effs () Source #

updateRows :: forall (table :: (Type -> Type) -> Type). Beamable table => forall effs. Member BeamEffect effs => SqlUpdate Sqlite table -> Eff effs () Source #

addRows :: forall (table :: (Type -> Type) -> Type). BeamableSqlite table => forall effs. Member BeamEffect effs => SqlInsert Sqlite table -> Eff effs () Source #

addRowsInBatches :: forall (table :: (Type -> Type) -> Type) (db :: (Type -> Type) -> Type). BeamableSqlite table => forall effs. Member BeamEffect effs => Int -> DatabaseEntity Sqlite db (TableEntity table) -> [table Identity] -> Eff effs () Source #