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]
- Alphabetic
- By Inheritance
- Aggregation
- QueryExpression
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract type Out
Output value of this expression.
Output value of this expression.
- Definition Classes
- QueryExpression
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- 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 anAggregation.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 chainedthat
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def processWindow(order: Ordering[A], values: Iterable[A])(implicit flatten: TupleFlatten[(A, Out)]): Iterable[utils.TupleFlatten.Out]
- Definition Classes
- Aggregation → QueryExpression
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()