pub async fn set_table_pref(
user_id: i64,
table: &str,
pref: &TablePref,
) -> Result<(), Error>Expand description
gaps2 #11 — merge a new TablePref into preferences.tables.<table>.
Read-modify-write rather than a JSON_SET / json_replace SQL pass:
the shape lives in user code, and the v1 single-tab usage doesn’t
race. When two tabs CAN race (the gap’s hx-trigger="change delay:500ms" follow-up), the merge moves to the SQL layer; the
in-memory merge here is forward-compatible because the JSON
structure is the same either way.