eraseRowsWithRecord

open suspend fun eraseRowsWithRecord(userId: String, build: suspend (List<AuditEventEntity>) -> Pair<AuditEventEntity, AuditChainState>): Int

Atomic erase: delete every row of userId, then insert the row and chain state that build returns for the removed rows. Any exception rolls the whole erase back.

Return

Number of rows removed.