2021-04-12 13:18:29 +03:00
|
|
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
|
|
|
|
2021-11-04 19:08:33 +03:00
|
|
|
module Hasura.Backends.BigQuery.Instances.Metadata () where
|
2021-04-12 13:18:29 +03:00
|
|
|
|
2021-09-24 01:56:37 +03:00
|
|
|
import Hasura.Backends.BigQuery.DDL qualified as BigQuery
|
2023-04-05 23:14:35 +03:00
|
|
|
import Hasura.Backends.BigQuery.Schema.Introspection qualified as BigQuery (listAllTables)
|
2022-05-25 13:24:41 +03:00
|
|
|
import Hasura.Base.Error (Code (UnexpectedPayload), throw400)
|
2022-05-05 16:43:50 +03:00
|
|
|
import Hasura.Prelude
|
|
|
|
import Hasura.RQL.Types.EventTrigger (RecreateEventTriggers (RETDoNothing))
|
2021-09-24 01:56:37 +03:00
|
|
|
import Hasura.RQL.Types.Metadata.Backend
|
|
|
|
import Hasura.SQL.Backend
|
2022-11-02 01:41:22 +03:00
|
|
|
import Hasura.Server.Migrate.Version (SourceCatalogMigrationState (SCMSNotSupported))
|
2021-04-12 13:18:29 +03:00
|
|
|
|
|
|
|
instance BackendMetadata 'BigQuery where
|
2022-11-02 01:41:22 +03:00
|
|
|
prepareCatalog _ = pure (RETDoNothing, SCMSNotSupported)
|
2021-09-24 01:56:37 +03:00
|
|
|
buildComputedFieldInfo = BigQuery.buildComputedFieldInfo
|
2021-04-12 13:18:29 +03:00
|
|
|
fetchAndValidateEnumValues = BigQuery.fetchAndValidateEnumValues
|
2022-09-05 05:42:59 +03:00
|
|
|
resolveSourceConfig = BigQuery.resolveSourceConfig
|
2022-03-08 16:02:13 +03:00
|
|
|
resolveDatabaseMetadata _ = BigQuery.resolveSource
|
2021-09-24 01:56:37 +03:00
|
|
|
parseBoolExpOperations = BigQuery.parseBoolExpOperations
|
|
|
|
buildFunctionInfo = BigQuery.buildFunctionInfo
|
2021-04-12 13:18:29 +03:00
|
|
|
updateColumnInEventTrigger = BigQuery.updateColumnInEventTrigger
|
2021-09-24 01:56:37 +03:00
|
|
|
parseCollectableType = BigQuery.parseCollectableType
|
|
|
|
postDropSourceHook = BigQuery.postDropSourceHook
|
2022-05-25 13:24:41 +03:00
|
|
|
buildComputedFieldBooleanExp _ _ _ _ _ _ =
|
|
|
|
throw400 UnexpectedPayload "Computed fields are not supported in boolean expressions"
|
2023-03-08 08:59:40 +03:00
|
|
|
supportsBeingRemoteRelationshipTarget _ = True
|
2023-04-05 23:14:35 +03:00
|
|
|
listAllTables = BigQuery.listAllTables
|
2023-03-31 18:33:32 +03:00
|
|
|
validateLogicalModel _ _ _ _ = pure ()
|