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

Hasura.RQL.Types.Metadata.Backend

Documentation

class (Backend b, Eq (AggregationPredicates b (PartialSQLExp b)), Eq (BooleanOperators b (PartialSQLExp b)), Eq (FunctionArgumentExp b (PartialSQLExp b)), Ord (BackendInvalidationKeys b), Hashable (AggregationPredicates b (PartialSQLExp b)), Hashable (BooleanOperators b (PartialSQLExp b)), Hashable (FunctionArgumentExp b (PartialSQLExp b)), Monoid (BackendInvalidationKeys b)) => BackendMetadata (b :: BackendType) where Source #

Associated Types

type BackendInvalidationKeys b Source #

Methods

buildComputedFieldInfo :: MonadError QErr m => HashSet (TableName b) -> TableName b -> HashSet (Column b) -> ComputedFieldName -> ComputedFieldDefinition b -> RawFunctionInfo b -> Comment -> m (ComputedFieldInfo b) Source #

fetchAndValidateEnumValues :: (MonadIO m, MonadBaseControl IO m) => SourceConfig b -> TableName b -> Maybe (PrimaryKey b (RawColumnInfo b)) -> [RawColumnInfo b] -> m (Either QErr EnumValues) Source #

resolveBackendInfo :: (ArrowChoice arr, ArrowCache m arr, ArrowDistribute arr, ArrowWriter (Seq CollectItem) arr, MonadIO m, MonadBaseControl IO m, ProvidesNetwork m) => Logger Hasura -> (Dependency (Maybe (BackendInvalidationKeys b)), BackendConfig b) `arr` BackendInfo b Source #

resolveSourceConfig :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => SourceName -> SourceConnConfiguration b -> BackendSourceKind b -> BackendInfo b -> Environment -> Manager -> m (Either QErr (SourceConfig b)) Source #

Function that resolves the connection related source configuration, and creates a connection pool (and other related parameters) in the process

resolveDatabaseMetadata :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => Logger Hasura -> SourceMetadata b -> SourceConfig b -> m (Either QErr (DBObjectsIntrospection b)) Source #

Function that introspects a database for tables, columns, functions etc.

parseBoolExpOperations :: MonadError QErr m => ValueParser b m v -> FieldInfoMap (FieldInfo b) -> FieldInfoMap (FieldInfo b) -> ColumnReference b -> Value -> m [OpExpG b v] Source #

buildObjectRelationshipInfo :: MonadError QErr m => SourceConfig b -> SourceName -> HashMap (TableName b) (HashSet (ForeignKey b)) -> TableName b -> ObjRelDef b -> m (RelInfo b, Seq SchemaDependency) Source #

buildArrayRelationshipInfo :: MonadError QErr m => SourceConfig b -> SourceName -> HashMap (TableName b) (HashSet (ForeignKey b)) -> TableName b -> ArrRelDef b -> m (RelInfo b, Seq SchemaDependency) Source #

buildFunctionInfo Source #

updateColumnInEventTrigger :: TableName b -> Column b -> Column b -> TableName b -> EventTriggerConf b -> EventTriggerConf b Source #

parseCollectableType :: (MonadError QErr m, MonadReader r m, Has (ScalarTypeParsingContext b) r) => CollectableType (ColumnType b) -> Value -> m (PartialSQLExp b) Source #

postDropSourceHook :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m) => SourceConfig b -> TableEventTriggers b -> m () Source #

validateRelationship :: MonadError QErr m => TableCache b -> TableName b -> Either (ObjRelDef b) (ArrRelDef b) -> m () Source #

buildComputedFieldBooleanExp :: (MonadError QErr m, TableCoreInfoRM b m) => BoolExpResolver b m v -> BoolExpRHSParser b m v -> FieldInfoMap (FieldInfo b) -> FieldInfoMap (FieldInfo b) -> ComputedFieldInfo b -> Value -> m (AnnComputedFieldBoolExp b v) Source #

Function that that builds a boolean expression field out of a computed field

prepareCatalog :: (MonadIO m, MonadBaseControl IO m) => SourceConfig b -> ExceptT QErr m (RecreateEventTriggers, SourceCatalogMigrationState) Source #

Run all operations required to create, update, or migrate the internal catalog used by the backend for internal bookkeeping, if any. The return type indicates whether the performed operations subsequently require re-creating event trigers.

listAllTables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m [TableName b] Source #

List all the tables on a given data source, including those not tracked by Hasura. Primarily useful for user interfaces to allow untracked tables to be tracked.

listAllTrackables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m (TrackableInfo b) Source #

List all the functions on a given data source, including those not tracked by Hasura. Primarily useful for user interfaces to allow untracked functions to be tracked.

getTableInfo :: (CacheRM m, MetadataM m, MonadError QErr m, MonadBaseControl IO m, MonadIO m) => SourceName -> TableName b -> m (Maybe (SourceTableInfo b)) Source #

Get information about a given table on a given source, whether tracked or not. Primarily useful for user interfaces.

validateNativeQuery :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration b -> LogicalModelInfo b -> NativeQueryMetadata b -> m (InterpolatedQuery ArgumentName) Source #

validateStoredProcedure :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration b -> LogicalModelInfo b -> StoredProcedureMetadata b -> m () Source #

getStoredProcedureGraphqlName :: MonadError QErr m => FunctionName b -> StoredProcedureConfig -> m Name Source #

supportsBeingRemoteRelationshipTarget :: SourceConfig b -> Bool Source #

Allows the backend to control whether or not a particular source supports being the target of remote relationships or not

Instances

Instances details
BackendMetadata 'BigQuery Source # 
Instance details

Defined in Hasura.Backends.BigQuery.Instances.Metadata

Methods

buildComputedFieldInfo :: MonadError QErr m => HashSet (TableName 'BigQuery) -> TableName 'BigQuery -> HashSet (Column 'BigQuery) -> ComputedFieldName -> ComputedFieldDefinition 'BigQuery -> RawFunctionInfo 'BigQuery -> Comment -> m (ComputedFieldInfo 'BigQuery) Source #

fetchAndValidateEnumValues :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'BigQuery -> TableName 'BigQuery -> Maybe (PrimaryKey 'BigQuery (RawColumnInfo 'BigQuery)) -> [RawColumnInfo 'BigQuery] -> m (Either QErr EnumValues) Source #

resolveBackendInfo :: forall arr (m :: Type -> Type). (ArrowChoice arr, ArrowCache m arr, ArrowDistribute arr, ArrowWriter (Seq CollectItem) arr, MonadIO m, MonadBaseControl IO m, ProvidesNetwork m) => Logger Hasura -> arr (Dependency (Maybe (BackendInvalidationKeys 'BigQuery)), BackendConfig 'BigQuery) (BackendInfo 'BigQuery) Source #

resolveSourceConfig :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => SourceName -> SourceConnConfiguration 'BigQuery -> BackendSourceKind 'BigQuery -> BackendInfo 'BigQuery -> Environment -> Manager -> m (Either QErr (SourceConfig 'BigQuery)) Source #

resolveDatabaseMetadata :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => Logger Hasura -> SourceMetadata 'BigQuery -> SourceConfig 'BigQuery -> m (Either QErr (DBObjectsIntrospection 'BigQuery)) Source #

parseBoolExpOperations :: MonadError QErr m => ValueParser 'BigQuery m v -> FieldInfoMap (FieldInfo 'BigQuery) -> FieldInfoMap (FieldInfo 'BigQuery) -> ColumnReference 'BigQuery -> Value -> m [OpExpG 'BigQuery v] Source #

buildObjectRelationshipInfo :: MonadError QErr m => SourceConfig 'BigQuery -> SourceName -> HashMap (TableName 'BigQuery) (HashSet (ForeignKey 'BigQuery)) -> TableName 'BigQuery -> ObjRelDef 'BigQuery -> m (RelInfo 'BigQuery, Seq SchemaDependency) Source #

buildArrayRelationshipInfo :: MonadError QErr m => SourceConfig 'BigQuery -> SourceName -> HashMap (TableName 'BigQuery) (HashSet (ForeignKey 'BigQuery)) -> TableName 'BigQuery -> ArrRelDef 'BigQuery -> m (RelInfo 'BigQuery, Seq SchemaDependency) Source #

buildFunctionInfo :: MonadError QErr m => SourceName -> FunctionName 'BigQuery -> SystemDefined -> FunctionConfig 'BigQuery -> FunctionPermissionsMap -> RawFunctionInfo 'BigQuery -> Maybe Text -> NamingCase -> m (FunctionInfo 'BigQuery, SchemaDependency) Source #

updateColumnInEventTrigger :: TableName 'BigQuery -> Column 'BigQuery -> Column 'BigQuery -> TableName 'BigQuery -> EventTriggerConf 'BigQuery -> EventTriggerConf 'BigQuery Source #

parseCollectableType :: (MonadError QErr m, MonadReader r m, Has (ScalarTypeParsingContext 'BigQuery) r) => CollectableType (ColumnType 'BigQuery) -> Value -> m (PartialSQLExp 'BigQuery) Source #

postDropSourceHook :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m) => SourceConfig 'BigQuery -> TableEventTriggers 'BigQuery -> m () Source #

validateRelationship :: MonadError QErr m => TableCache 'BigQuery -> TableName 'BigQuery -> Either (ObjRelDef 'BigQuery) (ArrRelDef 'BigQuery) -> m () Source #

buildComputedFieldBooleanExp :: (MonadError QErr m, TableCoreInfoRM 'BigQuery m) => BoolExpResolver 'BigQuery m v -> BoolExpRHSParser 'BigQuery m v -> FieldInfoMap (FieldInfo 'BigQuery) -> FieldInfoMap (FieldInfo 'BigQuery) -> ComputedFieldInfo 'BigQuery -> Value -> m (AnnComputedFieldBoolExp 'BigQuery v) Source #

prepareCatalog :: forall (m :: Type -> Type). (MonadIO m, MonadBaseControl IO m) => SourceConfig 'BigQuery -> ExceptT QErr m (RecreateEventTriggers, SourceCatalogMigrationState) Source #

listAllTables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m [TableName 'BigQuery] Source #

listAllTrackables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m (TrackableInfo 'BigQuery) Source #

getTableInfo :: (CacheRM m, MetadataM m, MonadError QErr m, MonadBaseControl IO m, MonadIO m) => SourceName -> TableName 'BigQuery -> m (Maybe (SourceTableInfo 'BigQuery)) Source #

validateNativeQuery :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration 'BigQuery -> LogicalModelInfo 'BigQuery -> NativeQueryMetadata 'BigQuery -> m (InterpolatedQuery ArgumentName) Source #

validateStoredProcedure :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration 'BigQuery -> LogicalModelInfo 'BigQuery -> StoredProcedureMetadata 'BigQuery -> m () Source #

getStoredProcedureGraphqlName :: MonadError QErr m => FunctionName 'BigQuery -> StoredProcedureConfig -> m Name Source #

supportsBeingRemoteRelationshipTarget :: SourceConfig 'BigQuery -> Bool Source #

BackendMetadata 'DataConnector Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Adapter.Metadata

Methods

buildComputedFieldInfo :: MonadError QErr m => HashSet (TableName 'DataConnector) -> TableName 'DataConnector -> HashSet (Column 'DataConnector) -> ComputedFieldName -> ComputedFieldDefinition 'DataConnector -> RawFunctionInfo 'DataConnector -> Comment -> m (ComputedFieldInfo 'DataConnector) Source #

fetchAndValidateEnumValues :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'DataConnector -> TableName 'DataConnector -> Maybe (PrimaryKey 'DataConnector (RawColumnInfo 'DataConnector)) -> [RawColumnInfo 'DataConnector] -> m (Either QErr EnumValues) Source #

resolveBackendInfo :: forall arr (m :: Type -> Type). (ArrowChoice arr, ArrowCache m arr, ArrowDistribute arr, ArrowWriter (Seq CollectItem) arr, MonadIO m, MonadBaseControl IO m, ProvidesNetwork m) => Logger Hasura -> arr (Dependency (Maybe (BackendInvalidationKeys 'DataConnector)), BackendConfig 'DataConnector) (BackendInfo 'DataConnector) Source #

resolveSourceConfig :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => SourceName -> SourceConnConfiguration 'DataConnector -> BackendSourceKind 'DataConnector -> BackendInfo 'DataConnector -> Environment -> Manager -> m (Either QErr (SourceConfig 'DataConnector)) Source #

resolveDatabaseMetadata :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => Logger Hasura -> SourceMetadata 'DataConnector -> SourceConfig 'DataConnector -> m (Either QErr (DBObjectsIntrospection 'DataConnector)) Source #

parseBoolExpOperations :: MonadError QErr m => ValueParser 'DataConnector m v -> FieldInfoMap (FieldInfo 'DataConnector) -> FieldInfoMap (FieldInfo 'DataConnector) -> ColumnReference 'DataConnector -> Value -> m [OpExpG 'DataConnector v] Source #

buildObjectRelationshipInfo :: MonadError QErr m => SourceConfig 'DataConnector -> SourceName -> HashMap (TableName 'DataConnector) (HashSet (ForeignKey 'DataConnector)) -> TableName 'DataConnector -> ObjRelDef 'DataConnector -> m (RelInfo 'DataConnector, Seq SchemaDependency) Source #

buildArrayRelationshipInfo :: MonadError QErr m => SourceConfig 'DataConnector -> SourceName -> HashMap (TableName 'DataConnector) (HashSet (ForeignKey 'DataConnector)) -> TableName 'DataConnector -> ArrRelDef 'DataConnector -> m (RelInfo 'DataConnector, Seq SchemaDependency) Source #

buildFunctionInfo :: MonadError QErr m => SourceName -> FunctionName 'DataConnector -> SystemDefined -> FunctionConfig 'DataConnector -> FunctionPermissionsMap -> RawFunctionInfo 'DataConnector -> Maybe Text -> NamingCase -> m (FunctionInfo 'DataConnector, SchemaDependency) Source #

updateColumnInEventTrigger :: TableName 'DataConnector -> Column 'DataConnector -> Column 'DataConnector -> TableName 'DataConnector -> EventTriggerConf 'DataConnector -> EventTriggerConf 'DataConnector Source #

parseCollectableType :: (MonadError QErr m, MonadReader r m, Has (ScalarTypeParsingContext 'DataConnector) r) => CollectableType (ColumnType 'DataConnector) -> Value -> m (PartialSQLExp 'DataConnector) Source #

postDropSourceHook :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m) => SourceConfig 'DataConnector -> TableEventTriggers 'DataConnector -> m () Source #

validateRelationship :: MonadError QErr m => TableCache 'DataConnector -> TableName 'DataConnector -> Either (ObjRelDef 'DataConnector) (ArrRelDef 'DataConnector) -> m () Source #

buildComputedFieldBooleanExp :: (MonadError QErr m, TableCoreInfoRM 'DataConnector m) => BoolExpResolver 'DataConnector m v -> BoolExpRHSParser 'DataConnector m v -> FieldInfoMap (FieldInfo 'DataConnector) -> FieldInfoMap (FieldInfo 'DataConnector) -> ComputedFieldInfo 'DataConnector -> Value -> m (AnnComputedFieldBoolExp 'DataConnector v) Source #

prepareCatalog :: forall (m :: Type -> Type). (MonadIO m, MonadBaseControl IO m) => SourceConfig 'DataConnector -> ExceptT QErr m (RecreateEventTriggers, SourceCatalogMigrationState) Source #

listAllTables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m [TableName 'DataConnector] Source #

listAllTrackables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m (TrackableInfo 'DataConnector) Source #

getTableInfo :: (CacheRM m, MetadataM m, MonadError QErr m, MonadBaseControl IO m, MonadIO m) => SourceName -> TableName 'DataConnector -> m (Maybe (SourceTableInfo 'DataConnector)) Source #

validateNativeQuery :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration 'DataConnector -> LogicalModelInfo 'DataConnector -> NativeQueryMetadata 'DataConnector -> m (InterpolatedQuery ArgumentName) Source #

validateStoredProcedure :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration 'DataConnector -> LogicalModelInfo 'DataConnector -> StoredProcedureMetadata 'DataConnector -> m () Source #

getStoredProcedureGraphqlName :: MonadError QErr m => FunctionName 'DataConnector -> StoredProcedureConfig -> m Name Source #

supportsBeingRemoteRelationshipTarget :: SourceConfig 'DataConnector -> Bool Source #

BackendMetadata 'MSSQL Source # 
Instance details

Defined in Hasura.Backends.MSSQL.Instances.Metadata

Associated Types

type BackendInvalidationKeys 'MSSQL Source #

Methods

buildComputedFieldInfo :: MonadError QErr m => HashSet (TableName 'MSSQL) -> TableName 'MSSQL -> HashSet (Column 'MSSQL) -> ComputedFieldName -> ComputedFieldDefinition 'MSSQL -> RawFunctionInfo 'MSSQL -> Comment -> m (ComputedFieldInfo 'MSSQL) Source #

fetchAndValidateEnumValues :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'MSSQL -> TableName 'MSSQL -> Maybe (PrimaryKey 'MSSQL (RawColumnInfo 'MSSQL)) -> [RawColumnInfo 'MSSQL] -> m (Either QErr EnumValues) Source #

resolveBackendInfo :: forall arr (m :: Type -> Type). (ArrowChoice arr, ArrowCache m arr, ArrowDistribute arr, ArrowWriter (Seq CollectItem) arr, MonadIO m, MonadBaseControl IO m, ProvidesNetwork m) => Logger Hasura -> arr (Dependency (Maybe (BackendInvalidationKeys 'MSSQL)), BackendConfig 'MSSQL) (BackendInfo 'MSSQL) Source #

resolveSourceConfig :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => SourceName -> SourceConnConfiguration 'MSSQL -> BackendSourceKind 'MSSQL -> BackendInfo 'MSSQL -> Environment -> Manager -> m (Either QErr (SourceConfig 'MSSQL)) Source #

resolveDatabaseMetadata :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => Logger Hasura -> SourceMetadata 'MSSQL -> SourceConfig 'MSSQL -> m (Either QErr (DBObjectsIntrospection 'MSSQL)) Source #

parseBoolExpOperations :: MonadError QErr m => ValueParser 'MSSQL m v -> FieldInfoMap (FieldInfo 'MSSQL) -> FieldInfoMap (FieldInfo 'MSSQL) -> ColumnReference 'MSSQL -> Value -> m [OpExpG 'MSSQL v] Source #

buildObjectRelationshipInfo :: MonadError QErr m => SourceConfig 'MSSQL -> SourceName -> HashMap (TableName 'MSSQL) (HashSet (ForeignKey 'MSSQL)) -> TableName 'MSSQL -> ObjRelDef 'MSSQL -> m (RelInfo 'MSSQL, Seq SchemaDependency) Source #

buildArrayRelationshipInfo :: MonadError QErr m => SourceConfig 'MSSQL -> SourceName -> HashMap (TableName 'MSSQL) (HashSet (ForeignKey 'MSSQL)) -> TableName 'MSSQL -> ArrRelDef 'MSSQL -> m (RelInfo 'MSSQL, Seq SchemaDependency) Source #

buildFunctionInfo :: MonadError QErr m => SourceName -> FunctionName 'MSSQL -> SystemDefined -> FunctionConfig 'MSSQL -> FunctionPermissionsMap -> RawFunctionInfo 'MSSQL -> Maybe Text -> NamingCase -> m (FunctionInfo 'MSSQL, SchemaDependency) Source #

updateColumnInEventTrigger :: TableName 'MSSQL -> Column 'MSSQL -> Column 'MSSQL -> TableName 'MSSQL -> EventTriggerConf 'MSSQL -> EventTriggerConf 'MSSQL Source #

parseCollectableType :: (MonadError QErr m, MonadReader r m, Has (ScalarTypeParsingContext 'MSSQL) r) => CollectableType (ColumnType 'MSSQL) -> Value -> m (PartialSQLExp 'MSSQL) Source #

postDropSourceHook :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m) => SourceConfig 'MSSQL -> TableEventTriggers 'MSSQL -> m () Source #

validateRelationship :: MonadError QErr m => TableCache 'MSSQL -> TableName 'MSSQL -> Either (ObjRelDef 'MSSQL) (ArrRelDef 'MSSQL) -> m () Source #

buildComputedFieldBooleanExp :: (MonadError QErr m, TableCoreInfoRM 'MSSQL m) => BoolExpResolver 'MSSQL m v -> BoolExpRHSParser 'MSSQL m v -> FieldInfoMap (FieldInfo 'MSSQL) -> FieldInfoMap (FieldInfo 'MSSQL) -> ComputedFieldInfo 'MSSQL -> Value -> m (AnnComputedFieldBoolExp 'MSSQL v) Source #

prepareCatalog :: forall (m :: Type -> Type). (MonadIO m, MonadBaseControl IO m) => SourceConfig 'MSSQL -> ExceptT QErr m (RecreateEventTriggers, SourceCatalogMigrationState) Source #

listAllTables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m [TableName 'MSSQL] Source #

listAllTrackables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m (TrackableInfo 'MSSQL) Source #

getTableInfo :: (CacheRM m, MetadataM m, MonadError QErr m, MonadBaseControl IO m, MonadIO m) => SourceName -> TableName 'MSSQL -> m (Maybe (SourceTableInfo 'MSSQL)) Source #

validateNativeQuery :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration 'MSSQL -> LogicalModelInfo 'MSSQL -> NativeQueryMetadata 'MSSQL -> m (InterpolatedQuery ArgumentName) Source #

validateStoredProcedure :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration 'MSSQL -> LogicalModelInfo 'MSSQL -> StoredProcedureMetadata 'MSSQL -> m () Source #

getStoredProcedureGraphqlName :: MonadError QErr m => FunctionName 'MSSQL -> StoredProcedureConfig -> m Name Source #

supportsBeingRemoteRelationshipTarget :: SourceConfig 'MSSQL -> Bool Source #

(Backend ('Postgres pgKind), PostgresMetadata pgKind, FetchTableMetadata pgKind, FetchFunctionMetadata pgKind, ToMetadataFetchQuery pgKind) => BackendMetadata ('Postgres pgKind) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Instances.Metadata

Associated Types

type BackendInvalidationKeys ('Postgres pgKind) Source #

Methods

buildComputedFieldInfo :: MonadError QErr m => HashSet (TableName ('Postgres pgKind)) -> TableName ('Postgres pgKind) -> HashSet (Column ('Postgres pgKind)) -> ComputedFieldName -> ComputedFieldDefinition ('Postgres pgKind) -> RawFunctionInfo ('Postgres pgKind) -> Comment -> m (ComputedFieldInfo ('Postgres pgKind)) Source #

fetchAndValidateEnumValues :: (MonadIO m, MonadBaseControl IO m) => SourceConfig ('Postgres pgKind) -> TableName ('Postgres pgKind) -> Maybe (PrimaryKey ('Postgres pgKind) (RawColumnInfo ('Postgres pgKind))) -> [RawColumnInfo ('Postgres pgKind)] -> m (Either QErr EnumValues) Source #

resolveBackendInfo :: forall arr (m :: Type -> Type). (ArrowChoice arr, ArrowCache m arr, ArrowDistribute arr, ArrowWriter (Seq CollectItem) arr, MonadIO m, MonadBaseControl IO m, ProvidesNetwork m) => Logger Hasura -> arr (Dependency (Maybe (BackendInvalidationKeys ('Postgres pgKind))), BackendConfig ('Postgres pgKind)) (BackendInfo ('Postgres pgKind)) Source #

resolveSourceConfig :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => SourceName -> SourceConnConfiguration ('Postgres pgKind) -> BackendSourceKind ('Postgres pgKind) -> BackendInfo ('Postgres pgKind) -> Environment -> Manager -> m (Either QErr (SourceConfig ('Postgres pgKind))) Source #

resolveDatabaseMetadata :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => Logger Hasura -> SourceMetadata ('Postgres pgKind) -> SourceConfig ('Postgres pgKind) -> m (Either QErr (DBObjectsIntrospection ('Postgres pgKind))) Source #

parseBoolExpOperations :: MonadError QErr m => ValueParser ('Postgres pgKind) m v -> FieldInfoMap (FieldInfo ('Postgres pgKind)) -> FieldInfoMap (FieldInfo ('Postgres pgKind)) -> ColumnReference ('Postgres pgKind) -> Value -> m [OpExpG ('Postgres pgKind) v] Source #

buildObjectRelationshipInfo :: MonadError QErr m => SourceConfig ('Postgres pgKind) -> SourceName -> HashMap (TableName ('Postgres pgKind)) (HashSet (ForeignKey ('Postgres pgKind))) -> TableName ('Postgres pgKind) -> ObjRelDef ('Postgres pgKind) -> m (RelInfo ('Postgres pgKind), Seq SchemaDependency) Source #

buildArrayRelationshipInfo :: MonadError QErr m => SourceConfig ('Postgres pgKind) -> SourceName -> HashMap (TableName ('Postgres pgKind)) (HashSet (ForeignKey ('Postgres pgKind))) -> TableName ('Postgres pgKind) -> ArrRelDef ('Postgres pgKind) -> m (RelInfo ('Postgres pgKind), Seq SchemaDependency) Source #

buildFunctionInfo :: MonadError QErr m => SourceName -> FunctionName ('Postgres pgKind) -> SystemDefined -> FunctionConfig ('Postgres pgKind) -> FunctionPermissionsMap -> RawFunctionInfo ('Postgres pgKind) -> Maybe Text -> NamingCase -> m (FunctionInfo ('Postgres pgKind), SchemaDependency) Source #

updateColumnInEventTrigger :: TableName ('Postgres pgKind) -> Column ('Postgres pgKind) -> Column ('Postgres pgKind) -> TableName ('Postgres pgKind) -> EventTriggerConf ('Postgres pgKind) -> EventTriggerConf ('Postgres pgKind) Source #

parseCollectableType :: (MonadError QErr m, MonadReader r m, Has (ScalarTypeParsingContext ('Postgres pgKind)) r) => CollectableType (ColumnType ('Postgres pgKind)) -> Value -> m (PartialSQLExp ('Postgres pgKind)) Source #

postDropSourceHook :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m) => SourceConfig ('Postgres pgKind) -> TableEventTriggers ('Postgres pgKind) -> m () Source #

validateRelationship :: MonadError QErr m => TableCache ('Postgres pgKind) -> TableName ('Postgres pgKind) -> Either (ObjRelDef ('Postgres pgKind)) (ArrRelDef ('Postgres pgKind)) -> m () Source #

buildComputedFieldBooleanExp :: (MonadError QErr m, TableCoreInfoRM ('Postgres pgKind) m) => BoolExpResolver ('Postgres pgKind) m v -> BoolExpRHSParser ('Postgres pgKind) m v -> FieldInfoMap (FieldInfo ('Postgres pgKind)) -> FieldInfoMap (FieldInfo ('Postgres pgKind)) -> ComputedFieldInfo ('Postgres pgKind) -> Value -> m (AnnComputedFieldBoolExp ('Postgres pgKind) v) Source #

prepareCatalog :: forall (m :: Type -> Type). (MonadIO m, MonadBaseControl IO m) => SourceConfig ('Postgres pgKind) -> ExceptT QErr m (RecreateEventTriggers, SourceCatalogMigrationState) Source #

listAllTables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m [TableName ('Postgres pgKind)] Source #

listAllTrackables :: (CacheRM m, MonadBaseControl IO m, MetadataM m, MonadError QErr m, MonadIO m, MonadReader r m, Has (Logger Hasura) r, ProvidesNetwork m) => SourceName -> m (TrackableInfo ('Postgres pgKind)) Source #

getTableInfo :: (CacheRM m, MetadataM m, MonadError QErr m, MonadBaseControl IO m, MonadIO m) => SourceName -> TableName ('Postgres pgKind) -> m (Maybe (SourceTableInfo ('Postgres pgKind))) Source #

validateNativeQuery :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration ('Postgres pgKind) -> LogicalModelInfo ('Postgres pgKind) -> NativeQueryMetadata ('Postgres pgKind) -> m (InterpolatedQuery ArgumentName) Source #

validateStoredProcedure :: (MonadIO m, MonadError QErr m) => Environment -> SourceConnConfiguration ('Postgres pgKind) -> LogicalModelInfo ('Postgres pgKind) -> StoredProcedureMetadata ('Postgres pgKind) -> m () Source #

getStoredProcedureGraphqlName :: MonadError QErr m => FunctionName ('Postgres pgKind) -> StoredProcedureConfig -> m Name Source #

supportsBeingRemoteRelationshipTarget :: SourceConfig ('Postgres pgKind) -> Bool Source #