polysemy-hasql-0.0.1.0: Polysemy effects for databases
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Hasql.Interpreter.AtomicState

Synopsis

Documentation

interpretAtomicStateDb :: Members [DbTable d !! e, Error InitDbError, Mask, Resource, Race, Embed IO] r => TableSchema d -> Sem r d -> InterpreterFor (AtomicState d !! e) r Source #

Interpret AtomicState as a singleton table.

Given an action that produces an initial value, every state action reads the value from the database and writes it back.