default <X extends Exception> void useIterator(IteratorConsumer<T, X> consumer) throws X {
        withIterator(iterator -> {
            consumer.useIterator(iterator);
            return null;
        });
    }
Passes the iterator of results to the consumer. Database resources owned by the query are
released before this method returns.

@param consumer a consumer which receives the iterator of results.
@throws X any exception thrown by the callback
core/src/main/java/org/jdbi/v3/core/result/ResultIterable.java