Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hasura.RQL.Types.SchemaCacheTypes
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 #
Constructors
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
).
Constructors
LMOPerm RoleName PermType | |
LMOCol (Column b) | |
LMOReferencedLogicalModel LogicalModelName |
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.
Constructors
NQOCol (Column b) | |
NQOReferencedLogicalModel LogicalModelName |
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 #
Constructors
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
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
Backend 'BigQuery => GetAggregationPredicatesDeps 'BigQuery Source # | |
Defined in Hasura.Backends.BigQuery.Instances.SchemaCache Methods getAggregationPredicateDeps :: AggregationPredicates 'BigQuery (PartialSQLExp 'BigQuery) -> BoolExpM 'BigQuery [SchemaDependency] Source # | |
Backend 'DataConnector => GetAggregationPredicatesDeps 'DataConnector Source # | |
Backend 'MSSQL => GetAggregationPredicatesDeps 'MSSQL Source # | |
Defined in Hasura.Backends.MSSQL.Instances.SchemaCache Methods getAggregationPredicateDeps :: AggregationPredicates 'MSSQL (PartialSQLExp 'MSSQL) -> BoolExpM 'MSSQL [SchemaDependency] Source # | |
Backend ('Postgres pgKind) => GetAggregationPredicatesDeps ('Postgres pgKind) Source # | |
Defined in Hasura.Backends.Postgres.Instances.SchemaCache Methods 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.
Constructors
BoolExpM | |
Fields
|
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 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 #