Safe Haskell | None |
---|---|
Language | GHC2024 |
Napkin.Run.Postgres
Synopsis
- withPostgresString :: Natural -> Text -> (BackendConn Postgres -> IO b) -> IO b
- data family BackendSchemaField (bk :: k)
- data family BackendConn b
Postgres Re-exports
withPostgresString :: Natural -> Text -> (BackendConn Postgres -> IO b) -> IO b #
data family BackendSchemaField (bk :: k) #
Instances
Show (BackendSchemaField Postgres) # | |
Defined in Napkin.Run.Postgres | |
Show (BackendSchemaField Redshift) # | |
Defined in Napkin.Run.Redshift | |
Eq (BackendSchemaField Postgres) # | |
Defined in Napkin.Run.Postgres Methods (==) :: BackendSchemaField Postgres -> BackendSchemaField Postgres -> Bool # (/=) :: BackendSchemaField Postgres -> BackendSchemaField Postgres -> Bool # | |
Eq (BackendSchemaField Redshift) # | |
Defined in Napkin.Run.Redshift Methods (==) :: BackendSchemaField Redshift -> BackendSchemaField Redshift -> Bool # (/=) :: BackendSchemaField Redshift -> BackendSchemaField Redshift -> Bool # | |
FromRow (BackendSchemaField Postgres) # | |
Defined in Napkin.Run.Postgres Methods | |
FromRow (BackendSchemaField Redshift) # | |
Defined in Napkin.Run.Redshift Methods | |
data BackendSchemaField Postgres # | |
Defined in Napkin.Run.Postgres | |
data BackendSchemaField Redshift # | |
Defined in Napkin.Run.Redshift |
data family BackendConn b #
Instances
Orphan instances
HasPostgresConn Postgres # | |||||
Methods getPostgresConn :: BackendConn Postgres -> Pool Connection # | |||||
Backend Postgres # | |||||
Associated Types
Methods backendConnectionString :: BackendConn Postgres -> ConnectionString # backendExecute :: (MonadNapkin Postgres m, RenderSql command Postgres) => BackendConn Postgres -> command -> m () # backendQuery :: (MonadNapkin Postgres m, RenderSql q Postgres) => BackendConn Postgres -> q -> m [Map Text Value] # backendCheckTableExists :: MonadNapkin Postgres m => BackendConn Postgres -> Ref Table -> m Bool # backendGetTableKind :: MonadNapkin Postgres m => BackendConn Postgres -> Ref Table -> m TableKind # backendGetRelationSchema :: MonadNapkin Postgres m => BackendConn Postgres -> Ref Table -> Relation -> m [BackendSchemaField Postgres] # backendGetAnnotations :: MonadNapkin Postgres m => BackendConn Postgres -> Ref Table -> m TableAnnotations # backendAnnotate :: MonadNapkin Postgres m => BackendConn Postgres -> Ref Table -> Annotation -> m () # backendCreateAs :: (command ~ CreateRelation Postgres, RenderSql command Postgres, MonadNapkin Postgres m) => BackendConn Postgres -> command -> m () # backendCreate :: (command ~ CreateTableSchema Postgres, RenderSql command Postgres, MonadNapkin Postgres m) => BackendConn Postgres -> command -> m () # backendCopyTable :: (MonadNapkin Postgres m, RenderSql DeleteRows Postgres, RenderSql InsertInto Postgres, RenderSql (CreateRelation Postgres) Postgres, Default (BackendMeta 'KindTable Postgres)) => BackendConn Postgres -> Ref Table -> Ref Table -> TableWriteStrategy -> m () # backendDrop :: MonadNapkin Postgres m => BackendConn Postgres -> DropRelation -> m () # backendInsertInto :: (command ~ InsertInto, RenderSql command Postgres, MonadNapkin Postgres m) => BackendConn Postgres -> command -> m () # backendRename :: MonadNapkin Postgres m => BackendConn Postgres -> RenameRelation -> m () # backendListTables :: MonadNapkin Postgres m => BackendConn Postgres -> ListTables -> m (Set ListedTable) # backendNormalize :: MonadNapkin Postgres m => BackendConn Postgres -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # backendAddColumn :: (command ~ AddColumnToTable, RenderSql command Postgres, MonadNapkin Postgres m) => BackendConn Postgres -> command -> m () # backendDropColumn :: (command ~ DropColumnFromTable, RenderSql command Postgres, MonadNapkin Postgres m) => BackendConn Postgres -> command -> m () # | |||||
RunBackendConn Postgres # | |||||
Methods runBackendConn :: LogEnv -> DbBackendOptions Postgres -> ConnectionString -> Maybe CredentialsPath -> Maybe AuthPort -> (BackendConn Postgres -> IO a) -> IO a # | |||||
CSVImport Postgres # | |||||
HasBackendSchemaField Postgres # | |||||
Associated Types
Methods fieldName :: BackendSchemaField Postgres -> Text # fieldType :: BackendSchemaField Postgres -> Type # | |||||
HasBackendQueryStats Postgres # | |||||
Associated Types
Methods | |||||
FromJSON (DbBackendOptions Postgres) # | |||||
Methods parseJSON :: Value -> Parser (DbBackendOptions Postgres) # parseJSONList :: Value -> Parser [DbBackendOptions Postgres] # | |||||
Default (DbBackendOptions Postgres) # | |||||
Methods | |||||
Generic (BackendConn Postgres) # | |||||
Associated Types
Methods from :: BackendConn Postgres -> Rep (BackendConn Postgres) x # to :: Rep (BackendConn Postgres) x -> BackendConn Postgres # | |||||
Generic (DbBackendOptions Postgres) # | |||||
Associated Types
Methods from :: DbBackendOptions Postgres -> Rep (DbBackendOptions Postgres) x # to :: Rep (DbBackendOptions Postgres) x -> DbBackendOptions Postgres # | |||||
Show (DbBackendOptions Postgres) # | |||||
Eq (DbBackendOptions Postgres) # | |||||
Methods (==) :: DbBackendOptions Postgres -> DbBackendOptions Postgres -> Bool # (/=) :: DbBackendOptions Postgres -> DbBackendOptions Postgres -> Bool # | |||||
FromJSON (BackendQueryStats Postgres) # | |||||
Methods parseJSON :: Value -> Parser (BackendQueryStats Postgres) # parseJSONList :: Value -> Parser [BackendQueryStats Postgres] # | |||||
ToJSON (BackendQueryStats Postgres) # | |||||
Methods toJSON :: BackendQueryStats Postgres -> Value # toEncoding :: BackendQueryStats Postgres -> Encoding # toJSONList :: [BackendQueryStats Postgres] -> Value # toEncodingList :: [BackendQueryStats Postgres] -> Encoding # omitField :: BackendQueryStats Postgres -> Bool # | |||||
Monoid (BackendQueryStats Postgres) # | |||||
Semigroup (BackendQueryStats Postgres) # | |||||
Methods (<>) :: BackendQueryStats Postgres -> BackendQueryStats Postgres -> BackendQueryStats Postgres # sconcat :: NonEmpty (BackendQueryStats Postgres) -> BackendQueryStats Postgres # stimes :: Integral b => b -> BackendQueryStats Postgres -> BackendQueryStats Postgres # | |||||
Generic (BackendQueryStats Postgres) # | |||||
Associated Types
Methods from :: BackendQueryStats Postgres -> Rep (BackendQueryStats Postgres) x # to :: Rep (BackendQueryStats Postgres) x -> BackendQueryStats Postgres # | |||||
Show (BackendSchemaField Postgres) # | |||||
Show (BackendQueryStats Postgres) # | |||||
Eq (BackendSchemaField Postgres) # | |||||
Methods (==) :: BackendSchemaField Postgres -> BackendSchemaField Postgres -> Bool # (/=) :: BackendSchemaField Postgres -> BackendSchemaField Postgres -> Bool # | |||||
Eq (BackendQueryStats Postgres) # | |||||
Methods (==) :: BackendQueryStats Postgres -> BackendQueryStats Postgres -> Bool # (/=) :: BackendQueryStats Postgres -> BackendQueryStats Postgres -> Bool # | |||||
FromRow (BackendSchemaField Postgres) # | |||||
Methods |