2021-07-07 04:43:42 +03:00
|
|
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
|
|
|
|
2022-02-08 12:24:34 +03:00
|
|
|
-- | Postgres Instances API
|
|
|
|
--
|
|
|
|
-- Defines a 'Hasura.Server.API.Backend.BackendAPI' type class instance for Postgres.
|
2021-11-04 19:08:33 +03:00
|
|
|
module Hasura.Backends.Postgres.Instances.API () where
|
2021-07-07 04:43:42 +03:00
|
|
|
|
2021-09-24 01:56:37 +03:00
|
|
|
import Hasura.Prelude
|
|
|
|
import Hasura.SQL.Backend
|
|
|
|
import Hasura.Server.API.Backend
|
|
|
|
import {-# SOURCE #-} Hasura.Server.API.Metadata
|
2021-07-07 04:43:42 +03:00
|
|
|
|
|
|
|
instance BackendAPI ('Postgres 'Vanilla) where
|
2021-09-24 01:56:37 +03:00
|
|
|
metadataV1CommandParsers =
|
|
|
|
concat
|
|
|
|
[ sourceCommands @('Postgres 'Vanilla),
|
|
|
|
tableCommands @('Postgres 'Vanilla),
|
|
|
|
tablePermissionsCommands @('Postgres 'Vanilla),
|
|
|
|
functionCommands @('Postgres 'Vanilla),
|
|
|
|
functionPermissionsCommands @('Postgres 'Vanilla),
|
|
|
|
relationshipCommands @('Postgres 'Vanilla),
|
|
|
|
remoteRelationshipCommands @('Postgres 'Vanilla),
|
|
|
|
eventTriggerCommands @('Postgres 'Vanilla),
|
2022-05-04 17:52:29 +03:00
|
|
|
computedFieldCommands @('Postgres 'Vanilla),
|
2021-09-24 01:56:37 +03:00
|
|
|
-- postgres specific
|
2022-05-04 17:52:29 +03:00
|
|
|
[ commandParser "set_table_is_enum" RMPgSetTableIsEnum
|
2021-09-24 01:56:37 +03:00
|
|
|
]
|
2021-07-07 04:43:42 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
instance BackendAPI ('Postgres 'Citus) where
|
2021-09-24 01:56:37 +03:00
|
|
|
metadataV1CommandParsers =
|
|
|
|
concat
|
|
|
|
[ sourceCommands @('Postgres 'Citus),
|
|
|
|
tableCommands @('Postgres 'Citus),
|
|
|
|
tablePermissionsCommands @('Postgres 'Citus),
|
|
|
|
functionCommands @('Postgres 'Citus),
|
|
|
|
functionPermissionsCommands @('Postgres 'Citus),
|
|
|
|
relationshipCommands @('Postgres 'Citus),
|
|
|
|
remoteRelationshipCommands @('Postgres 'Citus)
|
|
|
|
]
|