Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- interpColSpec :: [Column b] -> PermColSpec b -> [Column b]
- permissionIsDefined :: PermType -> RolePermInfo backend -> Bool
- assertPermDefined :: (Backend backend, MonadError QErr m) => RoleName -> PermType -> TableInfo backend -> m ()
- newtype CreatePerm a b = CreatePerm (WithTable b (PermDef b a))
- procBoolExp :: (QErrM m, TableCoreInfoRM b m, BackendMetadata b, GetAggregationPredicatesDeps b, MonadReader r m, Has (ScalarTypeParsingContext b) r) => SourceName -> TableName b -> FieldInfoMap (FieldInfo b) -> BoolExp b -> m (AnnBoolExpPartialSQL b, Seq SchemaDependency)
- procLogicalModelBoolExp :: forall b m r. (QErrM m, TableCoreInfoRM b m, BackendMetadata b, GetAggregationPredicatesDeps b, MonadReader r m, Has (ScalarTypeParsingContext b) r) => SourceName -> LogicalModelName -> FieldInfoMap (FieldInfo b) -> BoolExp b -> m (AnnBoolExpPartialSQL b, Seq SchemaDependency)
- annBoolExp :: (QErrM m, TableCoreInfoRM b m, BackendMetadata b) => BoolExpRHSParser b m v -> FieldInfoMap (FieldInfo b) -> FieldInfoMap (FieldInfo b) -> GBoolExp b ColExp -> m (AnnBoolExp b v)
- getDepHeadersFromVal :: Value -> [Text]
- getDependentHeaders :: BoolExp b -> HashSet Text
- data DropPerm b = DropPerm {}
Documentation
interpColSpec :: [Column b] -> PermColSpec b -> [Column b] Source #
Intrepet a PermColSpec
column specification, which can either refer to a
list of named columns or all columns.
permissionIsDefined :: PermType -> RolePermInfo backend -> Bool Source #
assertPermDefined :: (Backend backend, MonadError QErr m) => RoleName -> PermType -> TableInfo backend -> m () Source #
newtype CreatePerm a b Source #
CreatePerm (WithTable b (PermDef b a)) |
Instances
(Backend b, FromJSON (PermDef b a)) => FromJSON (CreatePerm a b) Source # | |
Defined in Hasura.RQL.DDL.Permission.Internal parseJSON :: Value -> Parser (CreatePerm a b) Source # parseJSONList :: Value -> Parser [CreatePerm a b] Source # |
procBoolExp :: (QErrM m, TableCoreInfoRM b m, BackendMetadata b, GetAggregationPredicatesDeps b, MonadReader r m, Has (ScalarTypeParsingContext b) r) => SourceName -> TableName b -> FieldInfoMap (FieldInfo b) -> BoolExp b -> m (AnnBoolExpPartialSQL b, Seq SchemaDependency) Source #
procLogicalModelBoolExp :: forall b m r. (QErrM m, TableCoreInfoRM b m, BackendMetadata b, GetAggregationPredicatesDeps b, MonadReader r m, Has (ScalarTypeParsingContext b) r) => SourceName -> LogicalModelName -> FieldInfoMap (FieldInfo b) -> BoolExp b -> m (AnnBoolExpPartialSQL b, Seq SchemaDependency) Source #
Interpret a BoolExp
into an AnnBoolExp
, collecting any dependencies as
we go. At the moment, the only dependencies we're likely to encounter are
independent dependencies on other tables. For example, "this user can only
select from this logical model if their ID is in the allowed_users
table".
annBoolExp :: (QErrM m, TableCoreInfoRM b m, BackendMetadata b) => BoolExpRHSParser b m v -> FieldInfoMap (FieldInfo b) -> FieldInfoMap (FieldInfo b) -> GBoolExp b ColExp -> m (AnnBoolExp b v) Source #
getDepHeadersFromVal :: Value -> [Text] Source #