graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Backends.Postgres.Instances.NativeQueries

Description

Validate native queries against postgres-like flavors.

Synopsis

Documentation

validateNativeQuery :: forall m pgKind. (MonadIO m, MonadError QErr m) => InsOrdHashMap PGScalarType Oid -> Environment -> PostgresConnConfiguration -> LogicalModelInfo ('Postgres pgKind) -> NativeQueryMetadata ('Postgres pgKind) -> m (InterpolatedQuery ArgumentName) Source #

Prepare a native query query against a postgres-like database to validate it.

nativeQueryToPreparedStatement :: forall m pgKind. MonadError QErr m => LogicalModelInfo ('Postgres pgKind) -> NativeQueryMetadata ('Postgres pgKind) -> m (ByteString, Text) Source #

Convert a native query to a prepared statement to be validate.

Used by validateNativeQuery. Exported for testing.