graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Backends.MySQL.Connection

Synopsis

Documentation

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.

parseTextRows :: [Field] -> [[Maybe ByteString]] -> [[Text]] Source #

withMySQLPool :: MonadIO m => Pool Connection -> (Connection -> IO a) -> m a Source #