Class: upsertMany

Adaptor~upsertMany(table, uuid, data, options) → {Operation}

new upsertMany(table, uuid, data, options) → {Operation}

Insert or update multiple records using ON CONFLICT UPDATE and excluded
Parameters:
Name Type Description
table string The target table
uuid string The uuid column to determine a matching/existing record
data array An array of objects or a function that returns an array
options object Optional options argument
Source:
Returns:
Type
Operation
Example
upsertMany(
  'users', // the DB table
  'email', // a DB column with a unique constraint OR a CONSTRAINT NAME
  [
    { name: 'one', email: 'one@openfn.org },
    { name: 'two', email: 'two@openfn.org },
  ]
 { logValues: true }
)