Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data MutateResp (b :: BackendType) a = MutateResp {
- _mrAffectedRows :: Int
- _mrReturningColumns :: [ColumnValues b a]
- execUpdateQuery :: forall pgKind m. (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) => StringifyNumbers -> Maybe NamingCase -> UserInfo -> (AnnotatedUpdate ('Postgres pgKind), Seq PrepArg) -> m EncJSON
- execDeleteQuery :: forall pgKind m. (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) => StringifyNumbers -> Maybe NamingCase -> UserInfo -> (AnnDel ('Postgres pgKind), Seq PrepArg) -> m EncJSON
- execInsertQuery :: (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) => StringifyNumbers -> Maybe NamingCase -> UserInfo -> (InsertQueryP1 ('Postgres pgKind), Seq PrepArg) -> m EncJSON
- executeMutationOutputQuery :: forall pgKind m. (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) => QualifiedTable -> [ColumnInfo ('Postgres pgKind)] -> Maybe Int -> MutationCTE -> MutationOutput ('Postgres pgKind) -> StringifyNumbers -> Maybe NamingCase -> [PrepArg] -> m EncJSON
- mutateAndFetchCols :: forall pgKind. (Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind) => QualifiedTable -> [ColumnInfo ('Postgres pgKind)] -> (MutationCTE, Seq PrepArg) -> StringifyNumbers -> Maybe NamingCase -> TxE QErr (MutateResp ('Postgres pgKind) TxtEncodedVal)
- type ValidateInputPayloadVersion = Int
- validateInputPayloadVersion :: ValidateInputPayloadVersion
- newtype ValidateInputErrorResponse = ValidateInputErrorResponse {
- _vierMessage :: Text
- data HttpHandlerLog = HttpHandlerLog {}
- data ValidateInsertInputLog = VIILHttpHandler HttpHandlerLog
- type InsertValidationPayloadMap pgKind = InsOrdHashMap (TableName ('Postgres pgKind)) ([AnnotatedInsertRow ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind))], ValidateInput ResolvedWebhook)
- validateUpdateMutation :: forall pgKind m. (MonadError QErr m, MonadIO m, MonadTrace m) => Environment -> Manager -> Logger Hasura -> UserInfo -> ResolvedWebhook -> [HeaderConf] -> Timeout -> Bool -> [Header] -> AnnotatedUpdateG ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind)) -> Maybe (HashMap Name (Value Variable)) -> m ()
- validateDeleteMutation :: forall m pgKind. (MonadError QErr m, MonadIO m, MonadTrace m) => Environment -> Manager -> Logger Hasura -> UserInfo -> ResolvedWebhook -> [HeaderConf] -> Timeout -> Bool -> [Header] -> AnnDelG ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind)) -> Maybe (HashMap Name (Value Variable)) -> m ()
- validateMutation :: forall m. (MonadError QErr m, MonadIO m, MonadTrace m) => Environment -> Manager -> Logger Hasura -> UserInfo -> ResolvedWebhook -> [HeaderConf] -> Timeout -> Bool -> [Header] -> Value -> m ()
Documentation
data MutateResp (b :: BackendType) a Source #
MutateResp | |
|
Instances
execUpdateQuery :: forall pgKind m. (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) => StringifyNumbers -> Maybe NamingCase -> UserInfo -> (AnnotatedUpdate ('Postgres pgKind), Seq PrepArg) -> m EncJSON Source #
execDeleteQuery :: forall pgKind m. (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) => StringifyNumbers -> Maybe NamingCase -> UserInfo -> (AnnDel ('Postgres pgKind), Seq PrepArg) -> m EncJSON Source #
execInsertQuery :: (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) => StringifyNumbers -> Maybe NamingCase -> UserInfo -> (InsertQueryP1 ('Postgres pgKind), Seq PrepArg) -> m EncJSON Source #
executeMutationOutputQuery Source #
:: forall pgKind m. (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) | |
=> QualifiedTable | |
-> [ColumnInfo ('Postgres pgKind)] | |
-> Maybe Int | |
-> MutationCTE | |
-> MutationOutput ('Postgres pgKind) | |
-> StringifyNumbers | |
-> Maybe NamingCase | |
-> [PrepArg] | Prepared params |
-> m EncJSON |
mutateAndFetchCols :: forall pgKind. (Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind) => QualifiedTable -> [ColumnInfo ('Postgres pgKind)] -> (MutationCTE, Seq PrepArg) -> StringifyNumbers -> Maybe NamingCase -> TxE QErr (MutateResp ('Postgres pgKind) TxtEncodedVal) Source #
type ValidateInputPayloadVersion = Int Source #
newtype ValidateInputErrorResponse Source #
Instances
data HttpHandlerLog Source #
HttpHandlerLog | |
|
Instances
ToJSON HttpHandlerLog Source # | |
Defined in Hasura.Backends.Postgres.Execute.Mutation toJSON :: HttpHandlerLog -> Value Source # toEncoding :: HttpHandlerLog -> Encoding Source # toJSONList :: [HttpHandlerLog] -> Value Source # toEncodingList :: [HttpHandlerLog] -> Encoding Source # | |
Show HttpHandlerLog Source # | |
Defined in Hasura.Backends.Postgres.Execute.Mutation showsPrec :: Int -> HttpHandlerLog -> ShowS # show :: HttpHandlerLog -> String # showList :: [HttpHandlerLog] -> ShowS # |
data ValidateInsertInputLog Source #
Instances
type InsertValidationPayloadMap pgKind = InsOrdHashMap (TableName ('Postgres pgKind)) ([AnnotatedInsertRow ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind))], ValidateInput ResolvedWebhook) Source #
Map of table name and the value that is being inserted for that table This map is helpful for collecting all the insert mutation arguments for the nested tables and then sending them all at onve to the input validation webhook.
validateUpdateMutation :: forall pgKind m. (MonadError QErr m, MonadIO m, MonadTrace m) => Environment -> Manager -> Logger Hasura -> UserInfo -> ResolvedWebhook -> [HeaderConf] -> Timeout -> Bool -> [Header] -> AnnotatedUpdateG ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind)) -> Maybe (HashMap Name (Value Variable)) -> m () Source #
validateDeleteMutation :: forall m pgKind. (MonadError QErr m, MonadIO m, MonadTrace m) => Environment -> Manager -> Logger Hasura -> UserInfo -> ResolvedWebhook -> [HeaderConf] -> Timeout -> Bool -> [Header] -> AnnDelG ('Postgres pgKind) Void (UnpreparedValue ('Postgres pgKind)) -> Maybe (HashMap Name (Value Variable)) -> m () Source #
validateMutation :: forall m. (MonadError QErr m, MonadIO m, MonadTrace m) => Environment -> Manager -> Logger Hasura -> UserInfo -> ResolvedWebhook -> [HeaderConf] -> Timeout -> Bool -> [Header] -> Value -> m () Source #