data_update_where
Set columns on EVERY row matching a filter, server-side, without pulling ids into your context — e.g. derive a tier from several columns. filter/filters = the data_rows grammar; set = {column: value}. only_if_empty=true skips rows where the column already holds a value (@empty counts as empty), so ordered rules (Hot, then Tier 1, 2, 3) run first-match-wins. Start with dry_run=true: it returns matched and sample rows (from → to). Each row goes through the same checks as data_write(id=…) and lands in its data_row_history; a row changed since selection is skipped (conflicts), never overwritten. A missing target column is declared first. Returns counts, not rows. If next_cursor is set, the time budget ran out: call again with cursor=<next_cursor>. set={"journal[+]": "…"} appends a line to each row's text cell (or an element to a list), under the row lock, without a revision check: concurrent appends all land. An append is never unchanged — rerunning the rule appends again. Past 64 000 characters a cell refuses the append: a log that long belongs in a table, one row per entry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"datastore": "<datastore>",
"set": "<set>"
},
"name": "data_update_where"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| set | Yes | The columns to set on every matching row: `{"tier": "Tier 1"}`. A value may carry its layers (`{"valeur": "Tier 1", "comment": "rule: fit>=8"}`). A column the schema does not declare yet is DECLARED first (type inferred). A value that would ERASE (null, "", [], `@empty`) is refused. `{"journal[+]": "…"}` APPENDS a line to a declared `text` column (or an element to a `list` one) on every matching row, without reading it. | |
| _org | No | ||
| _group | No | Équipe (id) de CET APPEL, sous son org parente. | |
| cursor | No | The `next_cursor` of a previous call that ran out of time — resumes after it. | |
| filter | No | Same grammar as `data_rows`: `{col: value}` or `{col: {op: value}}`. | |
| _run_id | No | OBLIGATOIRE à chaque appel dès `run_start` ou `data_claim_next` : sans lui, l'écriture sur une ligne réservée est refusée. Hérité seulement si le serveur tient un run actif — n'y compte pas. | |
| dry_run | No | Write nothing: return `matched` and a few `sample` rows with from → to. | |
| filters | No | Same grammar as `data_rows`: `[{field, op, value}]`, AND-ed with `filter`. Neither = EVERY row of the table. | |
| _project | No | Projet (id) de CET APPEL — jeton PRIMAIRE. `oto_project(op='list')`. | |
| datastore | Yes | ||
| only_if_empty | No | Only rows where every `set` column is empty — the `data_rows` `empty` predicate: absent, null, "" or `@empty`. Run ordered rules with it: first match wins. |