graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.RQL.Types.Backend

Synopsis

Documentation

type Representable a = (Show a, Eq a, Hashable a, Cacheable a, NFData a) Source #

type XEnable = () Source #

data SupportedNamingCase Source #

Used for keeping track of the extent of support of naming convention across different backends.

AllConventions implies a full support whereas OnlyHasuraCase implies a partial support of only HasuraCase

class (Representable (TableName b), Representable (FunctionName b), Representable (FunctionArgument b), Representable (ConstraintName b), Representable (BasicOrderType b), Representable (NullsOrderType b), Representable (Column b), Representable (ScalarType b), Representable (SQLExpression b), Representable (ScalarSelectionArguments b), Representable (SourceConnConfiguration b), Representable (ExtraTableMetadata b), Representable (XComputedField b), Representable (ComputedFieldDefinition b), Representable (ComputedFieldImplicitArguments b), Representable (ComputedFieldReturn b), Ord (TableName b), Ord (FunctionName b), Ord (ScalarType b), Data (TableName b), FromJSON (BackendConfig b), FromJSON (Column b), FromJSON (ConstraintName b), FromJSON (FunctionName b), FromJSON (ScalarType b), FromJSON (TableName b), FromJSON (SourceConnConfiguration b), FromJSON (ExtraTableMetadata b), FromJSON (ComputedFieldDefinition b), FromJSON (BackendSourceKind b), FromJSONKey (Column b), HasCodec (BackendSourceKind b), HasCodec (SourceConnConfiguration b), ToJSON (BackendConfig b), ToJSON (Column b), ToJSON (ConstraintName b), ToJSON (FunctionArgument b), ToJSON (FunctionName b), ToJSON (ScalarType b), ToJSON (SourceConfig b), ToJSON (TableName b), ToJSON (SourceConnConfiguration b), ToJSON (ExtraTableMetadata b), ToJSON (SQLExpression b), ToJSON (ComputedFieldDefinition b), ToJSON (ComputedFieldImplicitArguments b), ToJSON (ComputedFieldReturn b), ToJSONKey (Column b), ToJSONKey (FunctionName b), ToJSONKey (ScalarType b), ToJSONKey (TableName b), ToTxt (Column b), ToTxt (FunctionName b), ToTxt (ScalarType b), ToTxt (TableName b), ToTxt (ConstraintName b), ToErrorValue (Column b), ToErrorValue (FunctionName b), ToErrorValue (ScalarType b), ToErrorValue (TableName b), ToErrorValue (ConstraintName b), Cacheable (SourceConfig b), Cacheable (BackendConfig b), Typeable (TableName b), Typeable (ConstraintName b), Typeable b, HasTag b, Functor (FunctionArgumentExp b), Foldable (FunctionArgumentExp b), Traversable (FunctionArgumentExp b), Eq (BackendConfig b), Show (BackendConfig b), Monoid (BackendConfig b), Eq (CountType b), Show (CountType b), Eq (ScalarValue b), Show (ScalarValue b), Eq (XNodesAgg b), Show (XNodesAgg b), Eq (XRelay b), Show (XRelay b), Eq (XStreamingSubscription b), Show (XStreamingSubscription b), Traversable (BooleanOperators b), Functor (BackendUpdate b), Foldable (BackendUpdate b), Traversable (BackendUpdate b), Functor (BackendInsert b), Foldable (BackendInsert b), Traversable (BackendInsert b), Functor (AggregationPredicates b), Foldable (AggregationPredicates b), Traversable (AggregationPredicates b)) => Backend (b :: BackendType) where Source #

Mapping from abstract types to concrete backend representation

The RQL IR, used as the output of GraphQL parsers and of the RQL parsers, is backend-agnostic: it uses an abstract representation of the structure of a query, and delegates to the backends the task of choosing an appropriate concrete representation.

Additionally, grouping all those types under one typeclass rather than having dedicated type families allows to explicitly list all typeclass requirements, which simplifies the instance declarations of all IR types.

There are no injectivity requirements on those type families: it's okay for two different backends to use the same types. That means, however, that functions cannot identify to what backend b a given TableName b refers to; most generic functions will need either a type application or a Proxy parameter to disambiguate between different backends at the call site.

Associated Types

type BackendConfig b :: Type Source #

type SourceConnConfiguration b :: Type Source #

User facing connection configuration for a database.

type SourceConfig b :: Type Source #

Internal connection configuration for a database - connection string, connection pool etc

type TableName b :: Type Source #

type FunctionName b :: Type Source #

type RawFunctionInfo b :: Type Source #

type ConstraintName b :: Type Source #

type BasicOrderType b :: Type Source #

type NullsOrderType b :: Type Source #

type CountType b :: Type Source #

type Column b :: Type Source #

type ScalarValue b :: Type Source #

type ScalarType b :: Type Source #

type SQLExpression b :: Type Source #

type ComputedFieldDefinition b :: Type Source #

type ScalarSelectionArguments b :: Type Source #

Arguments of a scalar field's selection { query { some_table { # a scalar field column(ScalarSelectionArguments) } } }

type ExtraTableMetadata b :: Type Source #

type FunctionArgument b :: Type Source #

FunctionArgument

type FunctionArgumentExp b :: Type -> Type Source #

Function input argument expression

It is parameterised over the type of fields, which changes during the IR translation phases.

type ComputedFieldImplicitArguments b :: Type Source #

Computed field function argument values which are being implicitly inferred from table and/or session information

type ComputedFieldReturn b :: Type Source #

Computed field return information

type BooleanOperators b :: Type -> Type Source #

Intermediate Representation of extensions to the shared set of boolean operators on table fields.

It is parameterised over the type of fields, which changes during the IR translation phases.

type AggregationPredicates b :: Type -> Type Source #

Intermediate Representation of aggregation predicates. The default implementation makes aggregation predicates uninstantiable.

It is parameterised over the type of fields, which changes during the IR translation phases.

type BackendUpdate b :: Type -> Type Source #

Intermediate Representation of Update Mutations. The default implementation makes update expressions uninstantiable.

It is parameterised over the type of fields, which changes during the IR translation phases.

type BackendInsert b :: Type -> Type Source #

Intermediate Representation of Insert Mutations. The default implementation makes insert expressions uninstantiable.

It is parameterised over the type of fields, which changes during the IR translation phases.

type XComputedField b :: Type Source #

type XRelay b :: Type Source #

type XNodesAgg b :: Type Source #

type XNestedInserts b :: Type Source #

Extension to flag the availability of object and array relationships in inserts (aka nested inserts).

type XStreamingSubscription b :: Type Source #

Instances

Instances details
Backend 'MSSQL Source # 
Instance details

Defined in Hasura.Backends.MSSQL.Instances.Types

Backend 'BigQuery Source # 
Instance details

Defined in Hasura.Backends.BigQuery.Instances.Types

Backend 'MySQL Source # 
Instance details

Defined in Hasura.Backends.MySQL.Instances.Types

Backend 'DataConnector Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Adapter.Backend

(HasTag ('Postgres pgKind), Typeable ('Postgres pgKind), PostgresBackend pgKind, FromJSON (BackendSourceKind ('Postgres pgKind)), HasCodec (BackendSourceKind ('Postgres pgKind))) => Backend ('Postgres pgKind) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Instances.Types

Associated Types

type BackendConfig ('Postgres pgKind) Source #

type SourceConnConfiguration ('Postgres pgKind) Source #

type SourceConfig ('Postgres pgKind) Source #

type TableName ('Postgres pgKind) Source #

type FunctionName ('Postgres pgKind) Source #

type RawFunctionInfo ('Postgres pgKind) Source #

type ConstraintName ('Postgres pgKind) Source #

type BasicOrderType ('Postgres pgKind) Source #

type NullsOrderType ('Postgres pgKind) Source #

type CountType ('Postgres pgKind) Source #

type Column ('Postgres pgKind) Source #

type ScalarValue ('Postgres pgKind) Source #

type ScalarType ('Postgres pgKind) Source #

type SQLExpression ('Postgres pgKind) Source #

type ComputedFieldDefinition ('Postgres pgKind) Source #

type ScalarSelectionArguments ('Postgres pgKind) Source #

type ExtraTableMetadata ('Postgres pgKind) Source #

type FunctionArgument ('Postgres pgKind) Source #

type FunctionArgumentExp ('Postgres pgKind) :: Type -> Type Source #

type ComputedFieldImplicitArguments ('Postgres pgKind) Source #

type ComputedFieldReturn ('Postgres pgKind) Source #

type BooleanOperators ('Postgres pgKind) :: Type -> Type Source #

type AggregationPredicates ('Postgres pgKind) :: Type -> Type Source #

type BackendUpdate ('Postgres pgKind) :: Type -> Type Source #

type BackendInsert ('Postgres pgKind) :: Type -> Type Source #

type XComputedField ('Postgres pgKind) Source #

type XRelay ('Postgres pgKind) Source #

type XNodesAgg ('Postgres pgKind) Source #

type XNestedInserts ('Postgres pgKind) Source #

type XStreamingSubscription ('Postgres pgKind) Source #

_ReturnsOthers :: forall b. Prism' (ComputedFieldReturnType b) () Source #