graphql-engine/server/src-lib/Hasura/LogicalModel/IR.hs
Tom Harding b6799f0882 Import InsOrdHashMap, not OMap, OM, Map, HM, ...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8946
GitOrigin-RevId: 434e7c335bc69119020dd35761c7d4539bc51ff8
2023-04-27 07:43:22 +00:00

24 lines
716 B
Haskell

{-# LANGUAGE UndecidableInstances #-}
module Hasura.LogicalModel.IR
( LogicalModel (..),
)
where
import Data.HashMap.Strict.InsOrd qualified as InsOrdHashMap
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 :: InsOrdHashMap.InsOrdHashMap (Column b) (LogicalModelField b)
}
deriving (Generic)
deriving instance (Backend b) => Eq (LogicalModel b)
deriving instance (Backend b) => Show (LogicalModel b)