Helpers for running chunked queries with persistent