Module org.jooq
Package org.jooq.impl

Interface QOM.Product

All Superinterfaces:
AggregateFilterStep<BigDecimal>, AggregateFunction<BigDecimal>, Field<BigDecimal>, FieldOrConstraint, FieldOrRow, GroupField, Named, OrderField<BigDecimal>, QueryPart, SelectField<BigDecimal>, SelectFieldOrAsterisk, Serializable, Typed<BigDecimal>, WindowBeforeOverStep<BigDecimal>, WindowOverStep<BigDecimal>
Enclosing class:
QOM

public static interface QOM.Product extends AggregateFunction<BigDecimal>
The PRODUCT function.

Get the sum over a numeric field: product(distinct field).

Few dialects currently support multiplicative aggregation natively. jOOQ emulates this using exp(sum(log(arg))) for strictly positive numbers, and does some additional handling for zero and negative numbers.

Note that this implementation may introduce rounding errors, even for integer multiplication.

More information here: https://blog.jooq.org/how-to-write-a-multiplication-aggregate-function-in-sql.

  • Method Details

    • $field

      @NotNull @NotNull Field<? extends Number> $field()
    • $distinct

      boolean $distinct()
    • $field

      @NotNull @NotNull QOM.Product $field(Field<? extends Number> field)
    • $distinct

      @NotNull @NotNull QOM.Product $distinct(boolean distinct)