Interface ValqueriesGroupQuery<T>

All Known Implementing Classes:
BaseValqueriesQuery, TestDoubleQuery, ValqueriesQueryImpl

public interface ValqueriesGroupQuery<T>
  • Method Details

    • count

      ValqueriesGroupQuery<T> count(Function<T,?> field)
      Add an aggregation that counts non-NULL values of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Getter of the field to count
      Returns:
      this query, for chaining
    • count

      ValqueriesGroupQuery<T> count(BiConsumer<T,?> field)
      Add an aggregation that counts non-NULL values of a field.
      Parameters:
      field - Setter of the field to count
      Returns:
      this query, for chaining
    • sum

      ValqueriesGroupQuery<T> sum(Function<T,? extends Number> field)
      Add an aggregation that sums the values of a field. For Float and Double fields the result will be Double, for BigInteger and BigDecimal the result will be the same, for all other fields the result will be Long. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Getter of the field to sum
      Returns:
      this query, for chaining
    • sum

      ValqueriesGroupQuery<T> sum(BiConsumer<T,? extends Number> field)
      Add an aggregation that sums the values of a field. For Float and Double fields the result will be Double, for BigInteger and BigDecimal the result will be the same, for all other fields the result will be Long. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Setter of the field to sum
      Returns:
      this query, for chaining
    • max

      <X extends Comparable<? super X>> ValqueriesGroupQuery<T> max(Function<T,X> field)
      Add an aggregation that calculates the maximum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Getter of the field to calculate the maximum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • max

      <X extends Comparable<? super X>> ValqueriesGroupQuery<T> max(BiConsumer<T,X> field)
      Add an aggregation that calculates the maximum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Setter of the field to calculate the maximum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • min

      <X extends Comparable<? super X>> ValqueriesGroupQuery<T> min(Function<T,X> field)
      Add an aggregation that calculates the minimum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Getter of the field to calculate the minimum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • min

      <X extends Comparable<? super X>> ValqueriesGroupQuery<T> min(BiConsumer<T,X> field)
      Add an aggregation that calculates the minimum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Setter of the field to calculate the minimum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • concat

      ValqueriesGroupQuery<T> concat(Function<T,?> field, String separator)
      Add an aggregation that concatenates the values of a field as a string. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Getter of the field to concatenate
      separator - The separator to use between values
      Returns:
      this query, for chaining
    • concat

      ValqueriesGroupQuery<T> concat(BiConsumer<T,?> field, String separator)
      Add an aggregation that concatenates the values of a field as a string. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Parameters:
      field - Setter of the field to concatenate
      separator - The separator to use between values
      Returns:
      this query, for chaining
    • groupByExecute

      Stream<ValqueriesGroupResultRow> groupByExecute()
      Execute the query.
      Returns:
      A stream of rows, each containing the values of the fields that were grouped by and the values of the aggregations, both in the same order they were queried.