I've written a good chunk of code for this but there is one big issue with this I'm not sure how to solve best: this will "break" isolation from a user perspective.
More precisely, the goal is that from the user point of view all of this is transparent: it does a query and will then fetch query one by one and the driver will use that feature underneath to having getting into OOM situation and to avoid timeout for query yielding lots of result. However, since underneath we'll do multiple query, it might look as if there was not isolation if your unlucky with the timing of the requests.
So I don't know what to do about that. I unfortunately don't see a solution to fix it per-se, so the question is how to make that acceptable.