code: protected <R> R queryWithTransaction(String query, QueryFunction<R> function) {
          return getWithTransaction(tx -> query(tx, query, function));
      }
docs: Initiate a new transaction and execute a {@link Query} within that context,
  then return the results of {@literal function}.
  
  @param query    The query string to prepare.
  @param function The functional callback to pass a {@link Query} to.
  @param <R>      The expected return type of {@literal function}.
  @return The results of applying {@literal function}.