Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TableObjId (b :: BackendType)
- data SourceObjId (b :: BackendType)
- = SOITable (TableName b)
- | SOITableObj (TableName b) (TableObjId b)
- | SOIFunction (FunctionName b)
- data SchemaObjId
- reportSchemaObj :: SchemaObjId -> Text
- reportSchemaObjs :: [SchemaObjId] -> Text
- data DependencyReason
- reasonToTxt :: DependencyReason -> Text
- data SchemaDependency = SchemaDependency {}
- reportDependentObjectsExist :: MonadError QErr m => [SchemaObjId] -> m ()
- purgeSourceAndSchemaDependencies :: MonadError QErr m => SchemaObjId -> WriterT MetadataModifier m ()
- purgeDependentObject :: forall b m. (MonadError QErr m, Backend b) => SourceName -> SourceObjId b -> m MetadataModifier
- class Backend b => GetAggregationPredicatesDeps b where
- newtype BoolExpM b a = BoolExpM {
- unBoolExpM :: Reader (BoolExpCtx b) a
- data BoolExpCtx b = BoolExpCtx {}
- runBoolExpM :: BoolExpCtx b -> BoolExpM b a -> a
Documentation
data TableObjId (b :: BackendType) Source #
TOCol (Column b) | |
TORel RelName | |
TOComputedField ComputedFieldName | |
TORemoteRel RelName | |
TOForeignKey (ConstraintName b) | |
TOPerm RoleName PermType | |
TOTrigger TriggerName |
Instances
data SourceObjId (b :: BackendType) Source #
SOITable (TableName b) | |
SOITableObj (TableName b) (TableObjId b) | |
SOIFunction (FunctionName b) |
Instances
data SchemaObjId Source #
SOSource SourceName | |
SOSourceObj SourceName (AnyBackend SourceObjId) | |
SORemoteSchema RemoteSchemaName | |
SORemoteSchemaPermission RemoteSchemaName RoleName | |
SORemoteSchemaRemoteRelationship RemoteSchemaName Name RelName | A remote relationship on a remote schema type, identified by 1. remote schema name 2. remote schema type on which the relationship is defined 3. name of the relationship |
SORole RoleName |
Instances
reportSchemaObj :: SchemaObjId -> Text Source #
reportSchemaObjs :: [SchemaObjId] -> Text Source #
data DependencyReason Source #
DRTable | |
DRColumn | |
DRRemoteTable | |
DRLeftColumn | |
DRRightColumn | |
DRUsingColumn | |
DRFkey | |
DRRemoteFkey | |
DRUntyped | |
DROnType | |
DRSessionVariable | |
DRPayload | |
DRParent | |
DRRemoteSchema | |
DRRemoteRelationship | |
DRParentRole |
Instances
reasonToTxt :: DependencyReason -> Text Source #
data SchemaDependency Source #
Instances
reportDependentObjectsExist :: MonadError QErr m => [SchemaObjId] -> m () Source #
purgeSourceAndSchemaDependencies :: MonadError QErr m => SchemaObjId -> WriterT MetadataModifier m () Source #
purgeDependentObject :: forall b m. (MonadError QErr m, Backend b) => SourceName -> SourceObjId b -> m MetadataModifier Source #
class Backend b => GetAggregationPredicatesDeps b where Source #
Type class to collect schema dependencies from backend-specific aggregation predicates.
Nothing
getAggregationPredicateDeps :: AggregationPredicates b (PartialSQLExp b) -> BoolExpM b [SchemaDependency] Source #
default getAggregationPredicateDeps :: AggregationPredicates b ~ Const Void => AggregationPredicates b (PartialSQLExp b) -> BoolExpM b [SchemaDependency] Source #
Instances
Backend 'MSSQL => GetAggregationPredicatesDeps 'MSSQL Source # | |
Backend 'BigQuery => GetAggregationPredicatesDeps 'BigQuery Source # | |
Backend 'MySQL => GetAggregationPredicatesDeps 'MySQL Source # | |
Backend 'DataConnector => GetAggregationPredicatesDeps 'DataConnector Source # | |
Backend ('Postgres pgKind) => GetAggregationPredicatesDeps ('Postgres pgKind) Source # | |
Defined in Hasura.Backends.Postgres.Instances.SchemaCache getAggregationPredicateDeps :: AggregationPredicates ('Postgres pgKind) (PartialSQLExp ('Postgres pgKind)) -> BoolExpM ('Postgres pgKind) [SchemaDependency] Source # |
The monad for doing schema dependency discovery for boolean expressions. maintains the table context of the expressions being translated.
BoolExpM | |
|
Instances
Monad (BoolExpM b) Source # | |
Functor (BoolExpM b) Source # | |
Applicative (BoolExpM b) Source # | |
Defined in Hasura.RQL.Types.SchemaCacheTypes | |
MonadReader (BoolExpCtx b) (BoolExpM b) Source # | |
Defined in Hasura.RQL.Types.SchemaCacheTypes ask :: BoolExpM b (BoolExpCtx b) # local :: (BoolExpCtx b -> BoolExpCtx b) -> BoolExpM b a -> BoolExpM b a # reader :: (BoolExpCtx b -> a) -> BoolExpM b a # |
data BoolExpCtx b Source #
The table type context of schema dependency discovery. Boolean expressions
may refer to a so-called 'root table' (identified by a $
-sign in the
expression input syntax) or the current
table.
Instances
MonadReader (BoolExpCtx b) (BoolExpM b) Source # | |
Defined in Hasura.RQL.Types.SchemaCacheTypes ask :: BoolExpM b (BoolExpCtx b) # local :: (BoolExpCtx b -> BoolExpCtx b) -> BoolExpM b a -> BoolExpM b a # reader :: (BoolExpCtx b -> a) -> BoolExpM b a # |
runBoolExpM :: BoolExpCtx b -> BoolExpM b a -> a Source #