graphql-engine/server/src-lib/Hasura/Backends/MSSQL/Instances/Metadata.hs
Tom Harding 3cef692dd7 feature(server): Get _all_ source tables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8649
GitOrigin-RevId: 4bb9311d1d7ab4e8ee641bde5df2babcb1b8b306
2023-04-05 20:16:14 +00:00

32 lines
1.3 KiB
Haskell

{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | MSSQL Instances Metadata
--
-- Defines a 'Hasura.RQL.Types.Metadata.Backend.BackendMetadata' type class instance for MSSQL.
module Hasura.Backends.MSSQL.Instances.Metadata () where
import Hasura.Backends.MSSQL.DDL qualified as MSSQL
import Hasura.Backends.MSSQL.Schema.Introspection qualified as MSSQL (listAllTables)
import Hasura.Base.Error (throw500)
import Hasura.Prelude
import Hasura.RQL.Types.Metadata.Backend
import Hasura.SQL.Backend
instance BackendMetadata 'MSSQL where
prepareCatalog = MSSQL.prepareCatalog
buildComputedFieldInfo = MSSQL.buildComputedFieldInfo
fetchAndValidateEnumValues = MSSQL.fetchAndValidateEnumValues
resolveSourceConfig = MSSQL.resolveSourceConfig
resolveDatabaseMetadata _ = MSSQL.resolveDatabaseMetadata
parseBoolExpOperations = MSSQL.parseBoolExpOperations
buildFunctionInfo = MSSQL.buildFunctionInfo
updateColumnInEventTrigger = MSSQL.updateColumnInEventTrigger
parseCollectableType = MSSQL.parseCollectableType
postDropSourceHook = MSSQL.postDropSourceHook
buildComputedFieldBooleanExp _ _ _ _ _ _ =
throw500 "Computed fields are not yet defined for MSSQL backends"
supportsBeingRemoteRelationshipTarget _ = True
listAllTables = MSSQL.listAllTables
validateLogicalModel _ _ _ _ = pure () -- for now, all queries are valid