I think you can use result.rows.forEach here. The per-row handler is purely sync.