feat: add computed relationships

* work for select, mutations, rpc
* overrides detected relationships
This commit is contained in:
steve-chavez
2022-08-17 22:50:06 -05:00
committed by Steve Chavez
parent 06c9e246f4
commit d6ec171bcb
12 changed files with 281 additions and 23 deletions
@@ -26,6 +26,13 @@ data Relationship = Relationship
, relTableIsView :: Bool
, relFTableIsView :: Bool
}
| ComputedRelationship
{ relFunction :: QualifiedIdentifier
, relTable :: QualifiedIdentifier
, relForeignTable :: QualifiedIdentifier
, relToOne :: Bool
, relIsSelf :: Bool
}
deriving (Eq, Ord, Generic, JSON.ToJSON)
-- | The relationship cardinality