graphql-engine/server/src-lib/Hasura/LogicalModel/IR.hs
2023-04-24 18:37:33 +00:00

24 lines
702 B
Haskell

{-# LANGUAGE UndecidableInstances #-}
module Hasura.LogicalModel.IR
( LogicalModel (..),
)
where
import Data.HashMap.Strict.InsOrd qualified as InsOrd
import Hasura.LogicalModel.Types (LogicalModelField, LogicalModelName)
import Hasura.Prelude hiding (first)
import Hasura.RQL.Types.Backend (Backend (..))
import Hasura.RQL.Types.BackendType (BackendType)
-- | Description of a logical model for use in IR
data LogicalModel (b :: BackendType) = LogicalModel
{ lmName :: LogicalModelName,
lmFields :: InsOrd.InsOrdHashMap (Column b) (LogicalModelField b)
}
deriving (Generic)
deriving instance (Backend b) => Eq (LogicalModel b)
deriving instance (Backend b) => Show (LogicalModel b)