module Hasura.RQL.IR.Insert where import Hasura.Prelude import qualified Hasura.Backends.Postgres.SQL.Types as PG import Hasura.RQL.IR.BoolExp import Hasura.RQL.IR.Returning import Hasura.RQL.Types.Column import Hasura.RQL.Types.Common import Hasura.SQL.Backend data ConflictTarget = CTColumn ![PG.PGCol] | CTConstraint !PG.ConstraintName deriving (Show, Eq) data ConflictClauseP1 (b :: BackendType) v = CP1DoNothing !(Maybe ConflictTarget) | CP1Update !ConflictTarget ![Column b] !(PreSetColsG b v) (AnnBoolExp b v) deriving (Functor, Foldable, Traversable) data InsertQueryP1 (b :: BackendType) = InsertQueryP1 { iqp1Table :: !(TableName b) , iqp1Cols :: ![Column b] , iqp1Tuples :: ![[SQLExp b]] , iqp1Conflict :: !(Maybe (ConflictClauseP1 b (SQLExp b))) , iqp1CheckCond :: !(AnnBoolExpSQL b, Maybe (AnnBoolExpSQL b)) , iqp1Output :: !(MutationOutput b) , iqp1AllCols :: ![ColumnInfo b] }