DocsWorkflowsComponentsAppapp:record:bulk:update

app:record:bulk:update

Applies a patch across a set of records and returns the identifiers the write reached

Options

NameTypeDescription
schemastringThe name of the schema (database) that contains the table
tablestringThe name of the table that contains the records
ids[]stringThe identifiers of the records one shared patch is applied to
recordRecordThe shared patch applied to every record IDs names
records[]RecordA patch per record, each carrying its own id under "id"

Outputs

NameTypeDescription
ids[]stringThe identifiers of the records the write reached, which is never an echo of what the step named. An id that does not exist, or that the run's own envelope keeps out of reach, is absent
countintThe number of records updated

Example

name: Publish every drafted article
actions:
  - name: published
    component: app:record:bulk:update
    vars:
      schema: content
      table: articles
      ids: "{{ drafts.ids }}"
      record:
        status: published

outputs:
  ids: "{{ published.ids }}"