What it does
Write the same column values to every row a filter matches, without reading their ids first. where, any and search work as in query_table. expect_count, the number of rows you expect, is required: when the filter matches another number, nothing is written (409 validation_failed reason count_mismatch, with matched). At most 500 rows per call; a call without where, any or search is refused. Answers matched, updated and the ids.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
namerequired | string | The table. |
where | object | Filters by column, as in query_table: the rows to change. |
any | array of objects | A list of where filters, of which at least one must match. |
search | string | Text to find in the table's searchable columns. |
visibility | one of: shared, private, all | Only for an own_and_shared table. shared: rows that belong to no member. private: your own private rows (the owner: every member's). all, the default: everything you may read, so the shared rows plus your own. |
setrequired | object | Column values to write to each matched row. null clears a column. |
expect_countrequired | integer | How many rows the filter should match. |
site_id | string | Only for a site shared with you (whoami lists them): read or change that site's data as its member. |
Example
Call update_rows with these arguments:
{
"name": "tasks",
"where": {
"status": "open"
},
"set": {
"status": "done"
},
"expect_count": 12
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Count, find and change many rowsYour agent answers questions about a table without reading every row.
- Load rowsFill a table in one go, without duplicates.