writeRowInTransaction<State = never>(statement: InStatement,existingId: number | null,persist: () => Promise<void>,readState?: TransactionStateReader<State>,): Promise<number>
Write one row statement in a fresh write transaction and run persist (the
coupled join-table writes) on the same tx, so the row and its side writes
commit or roll back together. On update, the optional readState step runs
before the statement — it reads the state that reaches persist and may
refuse the write by throwing; creates skip it. Returns the row id.
optional
readState: TransactionStateReader<State>