default <R, X extends Exception> R withIterator(IteratorCallback<T, R, X> callback) throws X {
        try (ResultIterator<T> iterator = iterator()) {
            return callback.withIterator(iterator);
        }
    }
Passes the iterator of results to the callback. Database resources owned by the query are
released before this method returns.

@param callback a callback which receives the iterator of results, and returns some result.
@param <R> the type returned by the callback

@return the value returned by the callback.
@throws X any exception thrown by the callback
core/src/main/java/org/jdbi/v3/core/result/ResultIterable.java