public static <R> R transactionResult(final DataSource dataSource, final Function<DSLContext, R> function) {
        return contextResult(dataSource,
                context -> context.transactionResult(nested -> function.apply(DSL.using(nested))));
    }
@param dataSource
@param function
@param <R>
@return
@throws stroom.util.exception.DataChangedException If another thread/node has already changed the data
stroom-db-util/src/main/java/stroom/db/util/JooqUtil.java