Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Documentation
type ConnectionString = Text #
type MonadNapkin b m = (Monad m, ReifiesBackend b, Katip m, MonadUnliftIO m, LocalQueryStats b m, RenderSql Query b) #
class ReifiesBackend b => Backend b where #
data BackendConn b #
backendQuery :: (MonadNapkin b m, RenderSql q b) => BackendConn b -> q -> m [Map Text Value] #
backendConnectionString :: BackendConn b -> ConnectionString #
Instances
class HasBackendQueryStats b => LocalQueryStats b m where #
tellStats :: QueryStats b -> m () #
Instances
HasBackendQueryStats b => LocalQueryStats (b :: k) IO # | |
Defined in Napkin.Run.Base tellStats :: QueryStats b -> IO () # | |
HasBackendQueryStats b => LocalQueryStats (b :: k) (KatipT IO) # | |
Defined in Napkin.Run.Base tellStats :: QueryStats b -> KatipT IO () # | |
HasBackendQueryStats backend => LocalQueryStats (backend :: k) (ReaderT (IORef (QueryStats backend)) (KatipT IO)) # | |
Defined in Napkin.Run.Base tellStats :: QueryStats backend -> ReaderT (IORef (QueryStats backend)) (KatipT IO) () # |
class Command command return backend | backend command -> return where #
execCommand :: MonadNapkin backend m => BackendConn backend -> command -> m return #
Instances
discardQueryStats :: Katip m => KatipT IO a -> m a #
class (Eq (BackendSchemaField bk), Show (BackendSchemaField bk)) => HasBackendSchemaField bk where #
data BackendSchemaField bk #
fieldName :: BackendSchemaField bk -> Text #
fieldType :: BackendSchemaField bk -> Type #
Instances
HasBackendSchemaField BigQuery # | |
Defined in Napkin.Run.BigQuery data BackendSchemaField BigQuery # fieldName :: BackendSchemaField BigQuery -> Text # fieldType :: BackendSchemaField BigQuery -> Type # | |
HasBackendSchemaField MsSql # | |
Defined in Napkin.Run.MsSql data BackendSchemaField MsSql # fieldName :: BackendSchemaField MsSql -> Text # fieldType :: BackendSchemaField MsSql -> Type # | |
HasBackendSchemaField Postgres # | |
Defined in Napkin.Run.Postgres data BackendSchemaField Postgres # fieldName :: BackendSchemaField Postgres -> Text # fieldType :: BackendSchemaField Postgres -> Type # | |
HasBackendSchemaField Redshift # | |
Defined in Napkin.Run.Redshift data BackendSchemaField Redshift # fieldName :: BackendSchemaField Redshift -> Text # fieldType :: BackendSchemaField Redshift -> Type # | |
HasBackendSchemaField Sqlite # | |
Defined in Napkin.Run.Sqlite data BackendSchemaField Sqlite # fieldName :: BackendSchemaField Sqlite -> Text # fieldType :: BackendSchemaField Sqlite -> Type # |