{-# LANGUAGE UndecidableInstances #-}
module Hasura.Backends.MSSQL.Types.Insert
( BackendInsert (..),
IfMatched (..),
)
where
import Hasura.Backends.MSSQL.Types.Instances ()
import Hasura.Backends.MSSQL.Types.Internal
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp (AnnBoolExp)
import Hasura.RQL.Types.Backend (Backend)
import Hasura.SQL.Backend (BackendType (MSSQL))
data BackendInsert v = BackendInsert
{
BackendInsert v -> Maybe (IfMatched v)
_biIfMatched :: Maybe (IfMatched v)
}
deriving instance (Backend 'MSSQL, Show (IfMatched v), Show v) => Show (BackendInsert v)
deriving instance Backend 'MSSQL => Functor BackendInsert
deriving instance Backend 'MSSQL => Foldable BackendInsert
deriving instance Backend 'MSSQL => Traversable BackendInsert
data IfMatched v = IfMatched
{
IfMatched v -> [Column 'MSSQL]
_imMatchColumns :: [Column 'MSSQL],
IfMatched v -> [Column 'MSSQL]
_imUpdateColumns :: [Column 'MSSQL],
IfMatched v -> AnnBoolExp 'MSSQL v
_imConditions :: AnnBoolExp 'MSSQL v,
IfMatched v -> HashMap (Column 'MSSQL) v
_imColumnPresets :: HashMap ColumnName v
}
deriving instance (Backend 'MSSQL, Show (AnnBoolExp 'MSSQL v), Show v) => Show (IfMatched v)
deriving instance Backend 'MSSQL => Functor IfMatched
deriving instance Backend 'MSSQL => Foldable IfMatched
deriving instance Backend 'MSSQL => Traversable IfMatched