mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
ea5c92acae
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8876 GitOrigin-RevId: abfc18eeef96a1f3593bfe823adab4d161161333
45 lines
1.0 KiB
Haskell
45 lines
1.0 KiB
Haskell
{-# LANGUAGE TemplateHaskell #-}
|
|
{-# LANGUAGE UndecidableInstances #-}
|
|
|
|
module Hasura.RQL.IR.Delete
|
|
( AnnDel,
|
|
AnnDelG (..),
|
|
adTable,
|
|
adWhere,
|
|
adOutput,
|
|
adAllCols,
|
|
adNamingConvention,
|
|
)
|
|
where
|
|
|
|
import Control.Lens.TH (makeLenses)
|
|
import Data.Kind (Type)
|
|
import Hasura.GraphQL.Schema.NamingCase (NamingCase)
|
|
import Hasura.Prelude
|
|
import Hasura.RQL.IR.BoolExp
|
|
import Hasura.RQL.IR.Returning
|
|
import Hasura.RQL.Types.Backend
|
|
import Hasura.RQL.Types.BackendType
|
|
import Hasura.RQL.Types.Column
|
|
|
|
data AnnDelG (b :: BackendType) (r :: Type) v = AnnDel
|
|
{ _adTable :: TableName b,
|
|
_adWhere :: (AnnBoolExp b v, AnnBoolExp b v),
|
|
_adOutput :: MutationOutputG b r v,
|
|
_adAllCols :: [ColumnInfo b],
|
|
_adNamingConvention :: Maybe NamingCase
|
|
}
|
|
deriving (Functor, Foldable, Traversable)
|
|
|
|
type AnnDel b = AnnDelG b Void (SQLExpression b)
|
|
|
|
deriving instance
|
|
( Backend b,
|
|
Show (AnnBoolExp b a),
|
|
Show (MutationOutputG b r a),
|
|
Show a
|
|
) =>
|
|
Show (AnnDelG b r a)
|
|
|
|
$(makeLenses ''AnnDelG)
|