Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype CreateArrRel b = CreateArrRel {
- unCreateArrRel :: WithTable b (ArrRelDef b)
- newtype CreateObjRel b = CreateObjRel {
- unCreateObjRel :: WithTable b (ObjRelDef b)
- runCreateRelationship :: forall m b a. (MonadError QErr m, CacheRWM m, ToJSON a, MetadataM m, Backend b, BackendMetadata b) => RelType -> WithTable b (RelDef a) -> m EncJSON
- objRelP2Setup :: forall b m. (QErrM m, Backend b) => SourceName -> TableName b -> HashMap (TableName b) (HashSet (ForeignKey b)) -> RelDef (ObjRelUsing b) -> m (RelInfo b, [SchemaDependency])
- arrRelP2Setup :: forall b m. (QErrM m, Backend b) => HashMap (TableName b) (HashSet (ForeignKey b)) -> SourceName -> TableName b -> ArrRelDef b -> m (RelInfo b, [SchemaDependency])
- mkFkeyRel :: forall b m. QErrM m => Backend b => RelType -> InsertOrder -> SourceName -> RelName -> TableName b -> TableName b -> NonEmpty (Column b) -> HashMap (TableName b) (HashSet (ForeignKey b)) -> m (RelInfo b, [SchemaDependency])
- getRequiredFkey :: (QErrM m, Backend b) => NonEmpty (Column b) -> [ForeignKey b] -> m (ForeignKey b)
- drUsingColumnDep :: forall b. Backend b => SourceName -> TableName b -> Column b -> SchemaDependency
- data DropRel b = DropRel {
- _drSource :: SourceName
- _drTable :: TableName b
- _drRelationship :: RelName
- _drCascade :: Bool
- runDropRel :: forall b m. (MonadError QErr m, CacheRWM m, MetadataM m, BackendMetadata b) => DropRel b -> m EncJSON
- purgeRelDep :: forall b m. QErrM m => Backend b => SchemaObjId -> m (TableMetadata b -> TableMetadata b)
- data SetRelComment b = SetRelComment {
- arSource :: SourceName
- arTable :: TableName b
- arRelationship :: RelName
- arComment :: Maybe Text
- runSetRelComment :: forall m b. (CacheRWM m, MonadError QErr m, MetadataM m, BackendMetadata b) => SetRelComment b -> m EncJSON
Documentation
newtype CreateArrRel b Source #
CreateArrRel | |
|
Instances
Backend b => FromJSON (CreateArrRel b) Source # | |
Defined in Hasura.RQL.DDL.Relationship parseJSON :: Value -> Parser (CreateArrRel b) parseJSONList :: Value -> Parser [CreateArrRel b] |
newtype CreateObjRel b Source #
CreateObjRel | |
|
Instances
Backend b => FromJSON (CreateObjRel b) Source # | |
Defined in Hasura.RQL.DDL.Relationship parseJSON :: Value -> Parser (CreateObjRel b) parseJSONList :: Value -> Parser [CreateObjRel b] |
runCreateRelationship :: forall m b a. (MonadError QErr m, CacheRWM m, ToJSON a, MetadataM m, Backend b, BackendMetadata b) => RelType -> WithTable b (RelDef a) -> m EncJSON Source #
objRelP2Setup :: forall b m. (QErrM m, Backend b) => SourceName -> TableName b -> HashMap (TableName b) (HashSet (ForeignKey b)) -> RelDef (ObjRelUsing b) -> m (RelInfo b, [SchemaDependency]) Source #
arrRelP2Setup :: forall b m. (QErrM m, Backend b) => HashMap (TableName b) (HashSet (ForeignKey b)) -> SourceName -> TableName b -> ArrRelDef b -> m (RelInfo b, [SchemaDependency]) Source #
mkFkeyRel :: forall b m. QErrM m => Backend b => RelType -> InsertOrder -> SourceName -> RelName -> TableName b -> TableName b -> NonEmpty (Column b) -> HashMap (TableName b) (HashSet (ForeignKey b)) -> m (RelInfo b, [SchemaDependency]) Source #
getRequiredFkey :: (QErrM m, Backend b) => NonEmpty (Column b) -> [ForeignKey b] -> m (ForeignKey b) Source #
Try to find a foreign key constraint, identifying a constraint by its set of columns
drUsingColumnDep :: forall b. Backend b => SourceName -> TableName b -> Column b -> SchemaDependency Source #
DropRel | |
|
Instances
Backend b => FromJSON (DropRel b) Source # | |
Defined in Hasura.RQL.DDL.Relationship parseJSON :: Value -> Parser (DropRel b) parseJSONList :: Value -> Parser [DropRel b] |
runDropRel :: forall b m. (MonadError QErr m, CacheRWM m, MetadataM m, BackendMetadata b) => DropRel b -> m EncJSON Source #
purgeRelDep :: forall b m. QErrM m => Backend b => SchemaObjId -> m (TableMetadata b -> TableMetadata b) Source #
data SetRelComment b Source #
SetRelComment | |
|
Instances
runSetRelComment :: forall m b. (CacheRWM m, MonadError QErr m, MetadataM m, BackendMetadata b) => SetRelComment b -> m EncJSON Source #