2021-11-04 19:08:33 +03:00
|
|
|
module Hasura.RQL.IR.Update
|
2021-11-18 21:02:58 +03:00
|
|
|
( AnnotatedUpdateNode,
|
|
|
|
AnnotatedUpdateNodeG (..),
|
2021-11-04 19:08:33 +03:00
|
|
|
)
|
|
|
|
where
|
2020-10-29 19:58:13 +03:00
|
|
|
|
2021-09-24 01:56:37 +03:00
|
|
|
import Data.Kind (Type)
|
|
|
|
import Hasura.Prelude
|
|
|
|
import Hasura.RQL.IR.BoolExp
|
|
|
|
import Hasura.RQL.IR.Returning
|
|
|
|
import Hasura.RQL.Types.Backend
|
|
|
|
import Hasura.RQL.Types.Column
|
|
|
|
import Hasura.SQL.Backend
|
|
|
|
|
2021-11-18 21:02:58 +03:00
|
|
|
data AnnotatedUpdateNodeG (b :: BackendType) (r :: BackendType -> Type) v = AnnotatedUpdateNode
|
2021-09-24 01:56:37 +03:00
|
|
|
{ uqp1Table :: !(TableName b),
|
|
|
|
uqp1Where :: !(AnnBoolExp b v, AnnBoolExp b v),
|
|
|
|
uqp1Check :: !(AnnBoolExp b v),
|
2021-11-18 21:02:58 +03:00
|
|
|
-- | All the backend-specific data related to an update mutation
|
|
|
|
uqp1BackendIR :: BackendUpdate b v,
|
2021-09-24 01:56:37 +03:00
|
|
|
-- we don't prepare the arguments for returning
|
|
|
|
-- however the session variable can still be
|
|
|
|
-- converted as desired
|
|
|
|
uqp1Output :: !(MutationOutputG b r v),
|
|
|
|
uqp1AllCols :: ![ColumnInfo b]
|
|
|
|
}
|
|
|
|
deriving (Functor, Foldable, Traversable)
|
2020-10-29 19:58:13 +03:00
|
|
|
|
2021-11-18 21:02:58 +03:00
|
|
|
type AnnotatedUpdateNode b = AnnotatedUpdateNodeG b (Const Void) (SQLExpression b)
|