graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.RQL.Types.BackendType

Synopsis

Documentation

data PostgresKind Source #

Argument to Postgres; we represent backends which are variations on Postgres as sub-types of Postgres. This value indicates which "flavour" of Postgres a backend is.

Constructors

Vanilla 
Citus 
Cockroach 

Instances

Instances details
Generic PostgresKind Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Associated Types

type Rep PostgresKind :: Type -> Type #

Show PostgresKind Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Eq PostgresKind Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Ord PostgresKind Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Hashable PostgresKind Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

type Rep PostgresKind Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

type Rep PostgresKind = D1 ('MetaData "PostgresKind" "Hasura.RQL.Types.BackendType" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "Vanilla" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Citus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cockroach" 'PrefixI 'False) (U1 :: Type -> Type)))

data BackendType Source #

An enum that represents each backend we support.

Instances

Instances details
FromJSON BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

ToJSON BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Generic BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Associated Types

type Rep BackendType :: Type -> Type #

Show BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Eq BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Ord BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Hashable BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

ToTxt BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

GCompare BackendTag Source # 
Instance details

Defined in Hasura.RQL.Types.BackendTag

Methods

gcompare :: forall (a :: k) (b :: k). BackendTag a -> BackendTag b -> GOrdering a b Source #

GEq BackendTag Source # 
Instance details

Defined in Hasura.RQL.Types.BackendTag

Methods

geq :: forall (a :: k) (b :: k). BackendTag a -> BackendTag b -> Maybe (a :~: b) Source #

From BackendType NonEmptyText Source #

The name of the backend, as we expect it to appear in our metadata and API.

Instance details

Defined in Hasura.RQL.Types.BackendType

type Rep BackendType Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

type Rep BackendType = D1 ('MetaData "BackendType" "Hasura.RQL.Types.BackendType" "graphql-engine-1.0.0-inplace" 'False) ((C1 ('MetaCons "Postgres" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PostgresKind)) :+: C1 ('MetaCons "MSSQL" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BigQuery" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DataConnector" 'PrefixI 'False) (U1 :: Type -> Type)))

data BackendSourceKind (b :: BackendType) where Source #

Similar to BackendType, however, in the case of DataConnectorKind we need to be able capture the name of the data connector that should be used by the DataConnector backend. This type correlates to the kind property of SourceMetadata, which is usually just postgres, mssql, etc for static backends, but can be a configurable value for DataConnector hence requiring DataConnectorName for DataConnectorKind

This type cannot entirely replace BackendType because BackendType has a fixed number of possible values which can be enumerated over at compile time, but BackendSourceKind does not because DataConnector fundamentally is configured at runtime with DataConnectorName.

Instances

Instances details
FromJSON (BackendSourceKind 'BigQuery) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

FromJSON (BackendSourceKind 'DataConnector) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

FromJSON (BackendSourceKind 'MSSQL) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

FromJSON (BackendSourceKind ('Postgres 'Citus)) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

FromJSON (BackendSourceKind ('Postgres 'Cockroach)) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

FromJSON (BackendSourceKind ('Postgres 'Vanilla)) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

ToJSON (BackendSourceKind b) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

HasCodec (BackendSourceKind 'BigQuery) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

HasCodec (BackendSourceKind 'DataConnector) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

HasCodec (BackendSourceKind 'MSSQL) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

HasCodec (BackendSourceKind ('Postgres 'Citus)) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

HasCodec (BackendSourceKind ('Postgres 'Cockroach)) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

HasCodec (BackendSourceKind ('Postgres 'Vanilla)) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Show (BackendSourceKind b) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Eq (BackendSourceKind b) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Ord (BackendSourceKind b) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

ToTxt (BackendSourceKind b) Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

From (BackendSourceKind b) NonEmptyText Source # 
Instance details

Defined in Hasura.RQL.Types.BackendType

Backend b => FromJSONWithContext (BackendSourceKind b) (AddSource b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Source

Backend b => FromJSONWithContext (BackendSourceKind b) (UpdateSource b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Source

Backend b => FromJSONWithContext (BackendSourceKind b) (SourceMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

backendShortName :: BackendType -> Maybe Text Source #

Some generated APIs use a shortened version of the backend's name rather than its full name. This function returns the "short form" of a backend, if any.

backendTypeFromText :: Text -> Maybe BackendType Source #

This uses this lookup mechanism to avoid having to duplicate and hardcode the backend string. We accept both the short form and the long form of the backend's name.