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

Hasura.Backends.Postgres.DDL.RunSQL

Description

Postgres DDL RunSQL

Escape hatch for running raw SQL against a postgres database.

runRunSQL executes the provided raw SQL.

isSchemaCacheBuildRequiredRunSQL checks for known schema-mutating keywords in the raw SQL text.

See V2Query and Query.

Synopsis

Documentation

isSchemaCacheBuildRequiredRunSQL :: RunSQL -> Bool Source #

Check for known schema-mutating keywords in the raw SQL text.

See Note [Checking metadata consistency in run_sql].

runRunSQL :: forall (pgKind :: PostgresKind) m. (BackendMetadata ('Postgres pgKind), ToMetadataFetchQuery pgKind, FetchTableMetadata pgKind, FetchFunctionMetadata pgKind, CacheRWM m, MetadataM m, MonadBaseControl IO m, MonadError QErr m, MonadIO m, MonadTrace m, UserInfoM m) => SQLGenCtx -> RunSQL -> m EncJSON Source #

Used as an escape hatch to run raw SQL against a database.