mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 04:24:35 +03:00
7d011644ac
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9353 GitOrigin-RevId: 9da95675d224f3045509592c2515b7afa2500d00
30 lines
1015 B
Haskell
30 lines
1015 B
Haskell
{-# LANGUAGE DuplicateRecordFields #-}
|
|
{-# LANGUAGE UndecidableInstances #-}
|
|
|
|
-- | More leaves cut from RQL.IR.Select for sake of breaking up the big pile of
|
|
-- things
|
|
module Hasura.RQL.IR.Select.RelationSelect
|
|
( AnnRelationSelectG (..),
|
|
)
|
|
where
|
|
|
|
import Hasura.Prelude
|
|
import Hasura.RQL.Types.Backend
|
|
import Hasura.RQL.Types.BackendType
|
|
import Hasura.RQL.Types.Common
|
|
import Hasura.RQL.Types.Relationships.Local (Nullable)
|
|
|
|
-- Local relationship
|
|
|
|
data AnnRelationSelectG (b :: BackendType) a = AnnRelationSelectG
|
|
{ _aarRelationshipName :: RelName, -- Relationship name
|
|
_aarColumnMapping :: HashMap (Column b) (Column b), -- Column of left table to join with
|
|
_aarNullable :: Nullable, -- is the target object allowed to be missing?
|
|
_aarAnnSelect :: a -- Current table. Almost ~ to SQL Select
|
|
}
|
|
deriving stock (Functor, Foldable, Traversable)
|
|
|
|
deriving stock instance (Backend b, Eq v) => Eq (AnnRelationSelectG b v)
|
|
|
|
deriving stock instance (Backend b, Show v) => Show (AnnRelationSelectG b v)
|