public <R> R execute(ResultProducer<R> producer) {
        try {
            return producer.produce(this::internalExecute, getContext());
        } catch (SQLException e) {
            cleanUpForException(e);
            throw new UnableToProduceResultException(e, getContext());
        }
    }
Executes the query, returning the result obtained from the given {@link ResultProducer}.

@param <R> the type of the result
@param producer the result producer.
@return value returned by the result producer.
core/src/main/java/org/jdbi/v3/core/statement/Query.java