mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
server: enable runSQL for cockroach
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5629 Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com> GitOrigin-RevId: 617da541d1754289dc6097c46ec1de3fcc6b48f9
This commit is contained in:
parent
c0b7d14adc
commit
d0ebb018e4
@ -48,8 +48,7 @@ runSetQueryTagsConfig (SetQueryTagsConfig sourceName queryTagsConfig) = do
|
||||
Just exists -> do
|
||||
let backendType = getBackendType exists
|
||||
case backendType of
|
||||
Postgres Vanilla -> setQueryTagsConfigInMetadata exists (Just queryTagsConfig)
|
||||
Postgres Citus -> setQueryTagsConfigInMetadata exists (Just queryTagsConfig)
|
||||
Postgres _ -> setQueryTagsConfigInMetadata exists (Just queryTagsConfig)
|
||||
_ -> queryTagsNotSupported backendType
|
||||
where
|
||||
getBackendType :: BackendSourceMetadata -> BackendType
|
||||
|
@ -50,6 +50,7 @@ data RQLQuery
|
||||
| RQRunSql !Postgres.RunSQL
|
||||
| RQMssqlRunSql !MSSQL.MSSQLRunSQL
|
||||
| RQCitusRunSql !Postgres.RunSQL
|
||||
| RQCockroachRunSql !Postgres.RunSQL
|
||||
| RQMysqlRunSql !MySQL.RunSQL
|
||||
| RQBigqueryRunSql !BigQuery.BigQueryRunSQL
|
||||
| RQBigqueryDatabaseInspection !BigQuery.BigQueryRunSQL
|
||||
@ -122,6 +123,7 @@ queryModifiesSchema = \case
|
||||
RQCount _ -> False
|
||||
RQRunSql q -> Postgres.isSchemaCacheBuildRequiredRunSQL q
|
||||
RQCitusRunSql q -> Postgres.isSchemaCacheBuildRequiredRunSQL q
|
||||
RQCockroachRunSql q -> Postgres.isSchemaCacheBuildRequiredRunSQL q
|
||||
RQMssqlRunSql q -> MSSQL.isSchemaCacheBuildRequiredRunSQL q
|
||||
RQMysqlRunSql _ -> False
|
||||
RQBigqueryRunSql _ -> False
|
||||
@ -152,6 +154,7 @@ runQueryM env rq = Tracing.trace (T.pack $ constrName rq) $ case rq of
|
||||
RQMssqlRunSql q -> MSSQL.runSQL q
|
||||
RQMysqlRunSql q -> MySQL.runSQL q
|
||||
RQCitusRunSql q -> Postgres.runRunSQL @'Citus q
|
||||
RQCockroachRunSql q -> Postgres.runRunSQL @'Cockroach q
|
||||
RQBigqueryRunSql q -> BigQuery.runSQL q
|
||||
RQBigqueryDatabaseInspection q -> BigQuery.runDatabaseInspection q
|
||||
RQBulk l -> encJFromList <$> indexedMapM (runQueryM env) l
|
||||
@ -165,6 +168,7 @@ queryModifiesUserDB = \case
|
||||
RQCount _ -> False
|
||||
RQRunSql _ -> True
|
||||
RQCitusRunSql _ -> True
|
||||
RQCockroachRunSql _ -> True
|
||||
RQMssqlRunSql _ -> True
|
||||
RQMysqlRunSql _ -> True
|
||||
RQBigqueryRunSql _ -> True
|
||||
|
Loading…
Reference in New Issue
Block a user