Safe Haskell | None |
---|---|
Language | GHC2024 |
Synopsis
- data QueryStats (backend :: k) = QueryStats {
- rowsAffected :: !(Maybe Int64)
- backend :: !(BackendQueryStats backend)
- class (ToJSON (BackendQueryStats backend), Show (BackendQueryStats backend), Eq (BackendQueryStats backend), Monoid (BackendQueryStats backend), ToJSON (BackendQueryStats backend)) => HasBackendQueryStats (backend :: k) where
- data BackendQueryStats (backend :: k)
- prettyPrint :: BackendQueryStats backend -> Maybe Text
- prettyQueryStats :: forall {k} (backend :: k). HasBackendQueryStats backend => QueryStats backend -> Text
- type StatsM (b :: k) = ReaderT (IORef (QueryStats b)) (KatipT IO)
- runStatsWith :: forall {k} (b :: k) a m. (MonadIO m, HasBackendQueryStats b) => LogEnv -> StatsM b a -> m (a, QueryStats b)
- runNoStats :: forall {k} (b :: k) a m. (MonadIO m, HasBackendQueryStats b) => LogEnv -> KatipT IO a -> m a
Documentation
data QueryStats (backend :: k) #
Used for aggregate statistics gathered from running queries.
QueryStats | |
|
Instances
class (ToJSON (BackendQueryStats backend), Show (BackendQueryStats backend), Eq (BackendQueryStats backend), Monoid (BackendQueryStats backend), ToJSON (BackendQueryStats backend)) => HasBackendQueryStats (backend :: k) where #
Nothing
data BackendQueryStats (backend :: k) #
prettyPrint :: BackendQueryStats backend -> Maybe Text #
prettyQueryStats :: forall {k} (backend :: k). HasBackendQueryStats backend => QueryStats backend -> Text #
runStatsWith :: forall {k} (b :: k) a m. (MonadIO m, HasBackendQueryStats b) => LogEnv -> StatsM b a -> m (a, QueryStats b) #
runNoStats :: forall {k} (b :: k) a m. (MonadIO m, HasBackendQueryStats b) => LogEnv -> KatipT IO a -> m a #