napkin-0.5.14
Safe HaskellSafe-Inferred
LanguageGHC2021

Napkin.Types.QueryStats

Synopsis

Documentation

newtype HookQueryStats bk #

Constructors

HookQueryStats 

Instances

Instances details
HasBackendQueryStats bk => Monoid (HookQueryStats bk) # 
Instance details

Defined in Napkin.Types.QueryStats

HasBackendQueryStats bk => Semigroup (HookQueryStats bk) # 
Instance details

Defined in Napkin.Types.QueryStats

Show (QueryStats bk) => Show (HookQueryStats bk) # 
Instance details

Defined in Napkin.Types.QueryStats

Eq (QueryStats bk) => Eq (HookQueryStats bk) # 
Instance details

Defined in Napkin.Types.QueryStats

data QueryStats backend #

Used for aggregate statistics gathered from running queries.

Instances

Instances details
HasBackendQueryStats backend => LocalQueryStats (backend :: k) (ReaderT (IORef (QueryStats backend)) (KatipT IO)) # 
Instance details

Defined in Napkin.Run.Base

Methods

tellStats :: QueryStats backend -> ReaderT (IORef (QueryStats backend)) (KatipT IO) () #

HasBackendQueryStats backend => Monoid (QueryStats backend) # 
Instance details

Defined in Napkin.Types.QueryStats

Methods

mempty :: QueryStats backend #

mappend :: QueryStats backend -> QueryStats backend -> QueryStats backend #

mconcat :: [QueryStats backend] -> QueryStats backend #

HasBackendQueryStats backend => Semigroup (QueryStats backend) # 
Instance details

Defined in Napkin.Types.QueryStats

Methods

(<>) :: QueryStats backend -> QueryStats backend -> QueryStats backend #

sconcat :: NonEmpty (QueryStats backend) -> QueryStats backend #

stimes :: Integral b => b -> QueryStats backend -> QueryStats backend #

Show (BackendQueryStats bk) => Show (QueryStats bk) # 
Instance details

Defined in Napkin.Types.QueryStats

Methods

showsPrec :: Int -> QueryStats bk -> ShowS #

show :: QueryStats bk -> String #

showList :: [QueryStats bk] -> ShowS #

Eq (BackendQueryStats bk) => Eq (QueryStats bk) # 
Instance details

Defined in Napkin.Types.QueryStats

Methods

(==) :: QueryStats bk -> QueryStats bk -> Bool #

(/=) :: QueryStats bk -> QueryStats bk -> Bool #

class (Show (BackendQueryStats backend), Eq (BackendQueryStats backend), Monoid (BackendQueryStats backend), ToJSON (BackendQueryStats backend), FromJSON (BackendQueryStats backend)) => HasBackendQueryStats backend where #

Minimal complete definition

Nothing

Associated Types

data BackendQueryStats backend :: Type #

Instances

Instances details
HasBackendQueryStats BigQuery # 
Instance details

Defined in Napkin.Run.BigQuery

Associated Types

data BackendQueryStats BigQuery #

HasBackendQueryStats MsSql # 
Instance details

Defined in Napkin.Run.MsSql

Associated Types

data BackendQueryStats MsSql #

HasBackendQueryStats Postgres # 
Instance details

Defined in Napkin.Run.Postgres

Associated Types

data BackendQueryStats Postgres #

HasBackendQueryStats Redshift # 
Instance details

Defined in Napkin.Run.Redshift

Associated Types

data BackendQueryStats Redshift #

HasBackendQueryStats Sqlite # 
Instance details

Defined in Napkin.Run.Sqlite

Associated Types

data BackendQueryStats Sqlite #

runStatsWith :: forall b a m. (MonadIO m, HasBackendQueryStats b) => LogEnv -> StatsM b a -> m (a, QueryStats b) #

runNoStats :: forall b a m. (MonadIO m, HasBackendQueryStats b) => LogEnv -> KatipT IO a -> m a #