Packages

trait Aggregation[-A] extends QueryExpression[A]

Description of an aggregation. It's a return type of aggregation function used inside groupBy -> aggregate query or inside a window function.

For instance, person.avgBy(_.age.toDouble) is an Aggregation.Of[Person, Double].

Example:

select[Person]
  .groupBy(_.country)
  .aggregate((country, person) => person.avgBy(_.age.toDouble))
A

input type of the aggregation function

Self Type
Aggregation[A]
Linear Supertypes
QueryExpression[A], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Aggregation
  2. QueryExpression
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type Out

    Output value of this expression.

    Output value of this expression.

    Definition Classes
    QueryExpression

Abstract Value Members

  1. abstract def apply(values: Iterable[A]): Out

    Applies this aggregation function to a set of values.

    Applies this aggregation function to a set of values.

    values

    values to aggregate

    returns

    the aggregation result

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def &&[A0 <: A](that: Aggregation[A0])(implicit tupled: TupleFlatten[(Out, Out)]): Of[A0, utils.TupleFlatten.Out]

    Chains multiple aggregation functions into a single one.

    Chains multiple aggregation functions into a single one. Used to apply multiple aggregations to a single record For instance, person.avgBy(_.age.toDouble) && person.sumBy(_.salary) is an Aggregation.Of[Person, (Double, BigDecimal)].

    Example:

    select[Person]
      .groupBy(_.country)
      .aggregate((country, person) =>
        person.avgBy(_.age.toDouble) && person.sumBy(_.salary)
      )
    that

    aggregation function to chain with

    returns

    this aggregation function chained that

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def contramap[A0](f: (A0) => A): Of[A0, Out]

    Transforms this aggregation function input type.

    Transforms this aggregation function input type.

    A0

    the new input type

    f

    reverse transformation function

    returns

    this aggregation function with new input type

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def map[B](f: (Out) => B): Of[A, B]

    Transforms this aggregation function output type.

    Transforms this aggregation function output type.

    B

    the new output type

    f

    transformation function

    returns

    this aggregation function with transformed output

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def processWindow(order: Ordering[A], values: Iterable[A])(implicit flatten: TupleFlatten[(A, Out)]): Iterable[utils.TupleFlatten.Out]
    Definition Classes
    AggregationQueryExpression
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from QueryExpression[A]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped