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

Control.Monad.Freer.Extras.Beam.Sqlite

Synopsis

Documentation

data DbConfig Source #

Constructors

DbConfig 

Fields

  • dbConfigFile :: Text

    The path to the sqlite database file. May be absolute or relative.

  • dbConfigPoolSize :: Int

    Max number of concurrent sqlite database connections.

Instances

Instances details
Eq DbConfig Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam.Sqlite

Show DbConfig Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam.Sqlite

Generic DbConfig Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam.Sqlite

Associated Types

type Rep DbConfig :: Type -> Type Source #

ToJSON DbConfig Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam.Sqlite

Methods

toJSON :: DbConfig -> Value

toEncoding :: DbConfig -> Encoding

toJSONList :: [DbConfig] -> Value

toEncodingList :: [DbConfig] -> Encoding

FromJSON DbConfig Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam.Sqlite

Methods

parseJSON :: Value -> Parser DbConfig

parseJSONList :: Value -> Parser [DbConfig]

Default DbConfig Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam.Sqlite

Methods

def :: DbConfig

type Rep DbConfig Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Beam.Sqlite

type Rep DbConfig = D1 ('MetaData "DbConfig" "Control.Monad.Freer.Extras.Beam.Sqlite" "freer-extras-1.2.0.0-1q4AUo79Td5ISTeTXorMWT" 'False) (C1 ('MetaCons "DbConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dbConfigFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "dbConfigPoolSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

defaultDbConfig :: DbConfig Source #

Default database config uses an in-memory sqlite database that is shared between all threads in the process.

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