| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hasura.RQL.Types.SchemaCacheTypes
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 #
Constructors
| TOCol (Column b) | |
| TORel RelName | |
| TOComputedField ComputedFieldName | |
| TORemoteRel RelName | |
| TOForeignKey (ConstraintName b) | |
| TOPerm RoleName PermType | |
| TOTrigger TriggerName |
Instances
data SourceObjId (b :: BackendType) Source #
Constructors
| SOITable (TableName b) | |
| SOITableObj (TableName b) (TableObjId b) | |
| SOIFunction (FunctionName b) |
Instances
data SchemaObjId Source #
Constructors
| 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 #
Constructors
| DRTable | |
| DRColumn | |
| DRRemoteTable | |
| DRLeftColumn | |
| DRRightColumn | |
| DRUsingColumn | |
| DRFkey | |
| DRRemoteFkey | |
| DRUntyped | |
| DROnType | |
| DRSessionVariable | |
| DRPayload | |
| DRParent | |
| DRRemoteSchema | |
| DRRemoteRelationship | |
| DRParentRole |
Instances
reasonToTxt :: DependencyReason -> Text Source #
data SchemaDependency Source #
Constructors
| SchemaDependency | |
Fields | |
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.
Minimal complete definition
Nothing
Methods
getAggregationPredicateDeps :: AggregationPredicates b (PartialSQLExp b) -> BoolExpM b [SchemaDependency] Source #
default getAggregationPredicateDeps :: AggregationPredicates b ~ Const Void => AggregationPredicates b (PartialSQLExp b) -> BoolExpM b [SchemaDependency] Source #
Instances
The monad for doing schema dependency discovery for boolean expressions. maintains the table context of the expressions being translated.
Constructors
| BoolExpM | |
Fields
| |
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 Methods 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.
Constructors
| BoolExpCtx | |
Instances
| MonadReader (BoolExpCtx b) (BoolExpM b) Source # | |
Defined in Hasura.RQL.Types.SchemaCacheTypes Methods 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 #