graphql-engine/server/src-lib/Hasura/RQL/IR/Conflict.hs
Philip Lykke Carlsen 2fbcd783e7 Refactor XOnConflict and ExtraInsertData
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3055
GitOrigin-RevId: 06f7f92f0e09695f5f7bc02df457d3b96ac9f5f6
2021-12-09 09:06:56 +00:00

24 lines
623 B
Haskell

module Hasura.RQL.IR.Conflict
( ConflictClauseP1 (..),
ConflictTarget (..),
)
where
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.Types.Backend
import Hasura.SQL.Backend
data ConflictTarget (b :: BackendType)
= CTColumn [Column b]
| CTConstraint (ConstraintName b)
deriving instance Backend b => Show (ConflictTarget b)
deriving instance Backend b => Eq (ConflictTarget b)
data ConflictClauseP1 (b :: BackendType) v
= CP1DoNothing (Maybe (ConflictTarget b))
| CP1Update (ConflictTarget b) [Column b] (PreSetColsG b v) (AnnBoolExp b v)
deriving (Functor, Foldable, Traversable)