Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.MultiPool.Persist.Sql
Contents
Documentation
class Monad m => MultiPoolBackend (m :: Type -> Type) backend where #
Associated Types
type Primaries backend :: Type #
type Replicas backend :: Type #
type LocalPrimary backend :: Type #
type LocalReplica backend :: Type #
type PrimaryConnection backend :: Type #
type ReplicaConnection backend :: Type #
type PrimaryIdentifier backend :: Type #
type ReplicaIdentifier backend :: Type #
Methods
runWriteAny :: MultiPool backend -> ReaderT (PrimaryConnection backend) m a -> m a #
runWrite :: MultiPool backend -> PrimaryIdentifier backend -> ReaderT (PrimaryConnection backend) m a -> m a #
runReadPrimary :: MultiPool backend -> PrimaryIdentifier backend -> ReaderT (ReplicaConnection backend) m a -> m a #
runReadAnyPrimary :: MultiPool backend -> ReaderT (ReplicaConnection backend) m a -> m a #
runReadAny :: MultiPool backend -> ReaderT (ReplicaConnection backend) m a -> m a #
runRead :: MultiPool backend -> ReplicaIdentifier backend -> ReaderT (ReplicaConnection backend) m a -> m a #
takePrimary :: MultiPool backend -> PrimaryIdentifier backend -> m (PrimaryConnection backend, LocalPrimary backend) #
putPrimary :: MultiPool backend -> LocalPrimary backend -> PrimaryConnection backend -> m () #
takeReplica :: MultiPool backend -> ReplicaIdentifier backend -> m (ReplicaConnection backend, LocalReplica backend) #
putReplica :: MultiPool backend -> LocalReplica backend -> ReplicaConnection backend -> m () #
Instances
unsafeRead :: ReaderT SqlBackend m a -> ReaderT SqlReadBackend m a Source #