graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Backends.MSSQL.Schema.IfMatched

Description

MSSQL Schema IfMatched

This module contains the building blocks for parsing if_matched clauses (represented as IfMatched), which in the MSSQL backend are used to implement upsert functionality.

These are used by backendInsertParser to construct a mssql-specific schema parser for insert (and upsert) mutations.

Synopsis

Documentation

ifMatchedFieldParser :: forall r m n. (MonadBuildSchema 'MSSQL r m n, AggregationPredicatesSchema 'MSSQL) => TableInfo 'MSSQL -> SchemaT r m (InputFieldsParser n (Maybe (IfMatched (UnpreparedValue 'MSSQL)))) Source #

Field-parser for:

if_matched: tablename_if_matched

input tablename_if_matched {
  match_columns: [tablename_select_column!]
  update_columns: [tablename_update_columns!]
  where: tablename_bool_exp
}

Note that the types ordinarily produced by this parser are only created if the active role has both select and update permissions to the table tablename defined and these grant non-empty column permissions.