Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data TableObjId (b :: BackendType)
- data LogicalModelObjId (b :: BackendType)
- data NativeQueryObjId (b :: BackendType)
- newtype StoredProcedureObjId (b :: BackendType) = SPOCol (Column b)
- data SourceObjId (b :: BackendType)
- = SOITable (TableName b)
- | SOITableObj (TableName b) (TableObjId b)
- | SOIFunction (FunctionName b)
- | SOINativeQuery NativeQueryName
- | SOINativeQueryObj NativeQueryName (NativeQueryObjId b)
- | SOIStoredProcedure (FunctionName b)
- | SOIStoredProcedureObj (FunctionName b) (StoredProcedureObjId b)
- | SOILogicalModel LogicalModelName
- | SOILogicalModelObj LogicalModelName (LogicalModelObjId 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 LogicalModelObjId (b :: BackendType) Source #
Identifiers for components of logical models within the metadata. These
are used to track dependencies within the resolved schema (see
SourceInfo
).
Instances
data NativeQueryObjId (b :: BackendType) Source #
Identifier for component of Native Queries within the metadata. These are
used to track dependencies between items in the resolved schema. For
instance, we use NQOCol
along with TOCol
from TableObjId
to ensure
that the two columns that join an array relationship actually exist.
Instances
newtype StoredProcedureObjId (b :: BackendType) Source #
Identifier for component of Stored Procedures within the metadata. These are
used to track dependencies between items in the resolved schema. For
instance, we use SPOCol
along with TOCol
from TableObjId
to ensure
that the two columns that join an array relationship actually exist.
Instances
data SourceObjId (b :: BackendType) Source #
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 #
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 'BigQuery => GetAggregationPredicatesDeps 'BigQuery Source # | |
Backend 'DataConnector => GetAggregationPredicatesDeps 'DataConnector Source # | |
Backend 'MSSQL => GetAggregationPredicatesDeps 'MSSQL 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
Applicative (BoolExpM b) Source # | |
Defined in Hasura.RQL.Types.SchemaCacheTypes | |
Functor (BoolExpM b) Source # | |
Monad (BoolExpM b) Source # | |
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 #