Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- resolveSourceConfig :: MonadIO m => Logger Hasura -> SourceName -> ConnSourceConfig -> BackendSourceKind 'MySQL -> BackendConfig 'MySQL -> environment -> manager -> m (Either QErr SourceConfig)
- resolveDatabaseMetadata :: MonadIO m => SourceConfig -> SourceTypeCustomization -> m (Either QErr (ResolvedSource 'MySQL))
- postDropSourceHook :: MonadIO m => SourceConfig -> TableEventTriggers 'MySQL -> m ()
- parseFieldResult :: Field -> Maybe ByteString -> Value
- fieldsToAeson :: [Field] -> [[Maybe ByteString]] -> [Value]
- runJSONPathQuery :: (MonadError QErr m, MonadIO m) => Pool Connection -> Query -> m Text
- parseAndCollectRows :: [Field] -> [[Maybe ByteString]] -> Vector (InsOrdHashMap FieldName Value)
- runQueryYieldingRows :: MonadIO m => Pool Connection -> Query -> m (Vector (InsOrdHashMap FieldName Value))
- fetchAllRows :: Result -> IO [[Maybe ByteString]]
- parseTextRows :: [Field] -> [[Maybe ByteString]] -> [[Text]]
- withMySQLPool :: MonadIO m => Pool Connection -> (Connection -> IO a) -> m a
Documentation
resolveSourceConfig :: MonadIO m => Logger Hasura -> SourceName -> ConnSourceConfig -> BackendSourceKind 'MySQL -> BackendConfig 'MySQL -> environment -> manager -> m (Either QErr SourceConfig) Source #
resolveDatabaseMetadata :: MonadIO m => SourceConfig -> SourceTypeCustomization -> m (Either QErr (ResolvedSource 'MySQL)) Source #
postDropSourceHook :: MonadIO m => SourceConfig -> TableEventTriggers 'MySQL -> m () Source #
parseFieldResult :: Field -> Maybe ByteString -> Value Source #
fieldsToAeson :: [Field] -> [[Maybe ByteString]] -> [Value] Source #
runJSONPathQuery :: (MonadError QErr m, MonadIO m) => Pool Connection -> Query -> m Text Source #
parseAndCollectRows :: [Field] -> [[Maybe ByteString]] -> Vector (InsOrdHashMap FieldName Value) Source #
Used by the dataloader to produce rows of records. Those rows of records are then manipulated by the dataloader to do Haskell-side joins. Is a Vector of HashMaps the most efficient choice? A pandas-style data frame could also be more efficient, dependingly. However, this is a legible approach; efficiency improvements can be added later.
runQueryYieldingRows :: MonadIO m => Pool Connection -> Query -> m (Vector (InsOrdHashMap FieldName Value)) Source #
Run a query immediately and parse up the results into a vector.
fetchAllRows :: Result -> IO [[Maybe ByteString]] Source #
parseTextRows :: [Field] -> [[Maybe ByteString]] -> [[Text]] Source #
withMySQLPool :: MonadIO m => Pool Connection -> (Connection -> IO a) -> m a Source #