Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides an API for suggesting relationships so that the console (or client) does not need to construct and submit relationship queries itself.
This suggests reciprocal object relationships A -> object -> B -> object -> A if there is a unique constraint on the column(s) in A mapping A->B, and if not then a reciprocal array relationship A -> object -> B -> array -> A is suggested.
All JSON fields to the main exported function runSuggestRels
are optional and behave as follows:
- _srsSource: The source to suggest relationships for - Defaults to
defaultSource
- _srsTables: The tables to suggest relationships between - Defaults to all tables
- _srsOmitTracked: Only suggest untracked relationships - Defaults to False
Autodocodec Codecs instances are implemented for these datatypes.
Synopsis
- data SuggestRels b
- runSuggestRels :: forall b m. (MonadError QErr m, CacheRWM m, BackendMetadata b) => SuggestRels b -> m EncJSON
Documentation
data SuggestRels b Source #
Datatype used by Metadata API to represent Request for Suggested Relationships
Instances
runSuggestRels :: forall b m. (MonadError QErr m, CacheRWM m, BackendMetadata b) => SuggestRels b -> m EncJSON Source #
The method invoked when dispatching on metadata calls in POST v1metadata