mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
4f835623b1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4400 GitOrigin-RevId: 2d90542f95ef4dad70c8dfe1ca3b4c1f3bdaa527
32 lines
1.0 KiB
Haskell
32 lines
1.0 KiB
Haskell
module Hasura.Backends.DataConnector.Schema.Column
|
|
( Column (..),
|
|
)
|
|
where
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
import Hasura.Backends.DataConnector.IR.Column qualified as Column (Name)
|
|
import Hasura.Backends.DataConnector.IR.Scalar.Type qualified as Scalar (Type)
|
|
import Hasura.Prelude
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
-- | A schematic representation which captures common attributes associated
|
|
-- with a piece of data that is stored in a given backend.
|
|
--
|
|
-- These attributes ascribe meaningful semantics to the data that they are
|
|
-- associated with.
|
|
--
|
|
-- cf. https://en.wikipedia.org/wiki/Column_(database)
|
|
-- https://www.postgresql.org/docs/13/ddl-basics.html
|
|
--
|
|
-- XXX: Instead of an @isNullable@ flag, should we instead add a @Nullable@
|
|
-- data constructor to 'Scalar.Type'?
|
|
data Column = Column
|
|
{ name :: Column.Name,
|
|
type_ :: Scalar.Type,
|
|
isNullable :: Bool,
|
|
description :: Maybe Text
|
|
}
|
|
deriving stock (Data, Eq, Generic, Ord, Show)
|