Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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.
Synopsis
- data RunSQL = RunSQL {}
- isSchemaCacheBuildRequiredRunSQL :: RunSQL -> Bool
- isReadOnly :: RunSQL -> Bool
- 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
Documentation
RunSQL | |
|
isSchemaCacheBuildRequiredRunSQL :: RunSQL -> Bool Source #
Check for known schema-mutating keywords in the raw SQL text.
See Note [Checking metadata consistency in run_sql].
isReadOnly :: RunSQL -> Bool Source #
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.