default <R> R collect(Collector<? super T, ?, R> collector) {
        try (Stream<T> stream = stream()) {
            return stream.collect(collector);
        }
    }
Collect the results into a container specified by a collector.

@param collector       the collector
@param <R>             the generic type of the container
@return the container with the query result
core/src/main/java/org/jdbi/v3/core/result/ResultIterable.java