nit: Maybe use a more descriptive name than `i` as its use spans multiple calls to `cursorOnSuccess`.