graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Backends.Postgres.Execute.Insert

Description

Postgres Execute Insert

Translates and executes IR to Postgres-specific SQL.

See Execute.

Synopsis

Documentation

validateInsert Source #

Arguments

:: MonadError QErr m 
=> [PGCol]

inserting columns

-> [RelInfo ('Postgres pgKind)]

object relation inserts

-> [PGCol]

additional fields from parent

-> m () 

Validate an insert object based on insert columns, insert object relations and additional columns from parent:

  • There should be no overlap between insCols and addCols.
  • There should be no overlap between any object relationship columns and insCols and addCols.

decodeEncJSON :: (FromJSON a, QErrM m) => EncJSON -> m a Source #