app:record:bulk:update
Applies a patch across a set of records and returns the identifiers the write reached
Options
| Name | Type | Description |
|---|---|---|
schema | string | The name of the schema (database) that contains the table |
table | string | The name of the table that contains the records |
ids | []string | The identifiers of the records one shared patch is applied to |
record | Record | The shared patch applied to every record IDs names |
records | []Record | A patch per record, each carrying its own id under "id" |
Outputs
| Name | Type | Description |
|---|---|---|
ids | []string | The 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 |
count | int | The 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 }}"