OverviewRequest

com.worxbend.persistence.repository.OverviewRequest
See theOverviewRequest companion object
final case class OverviewRequest

An overview query, validated.

The constructor is private so from is always aligned to step. An unaligned origin puts the generate_series skeleton and date_bin's output on different boundaries, the LEFT JOIN then matches nothing, and the chart renders as a row of zeroes over a database full of events — a failure that looks like "no data" rather than like a bug.

Value parameters

topN

entries per breakdown. Bounded because each breakdown is ORDER BY count DESC LIMIT ? over the whole window and an unbounded list is both a slow sort and a page nobody reads the end of.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def interval: String

The interval literal both generate_series and date_bin are given, as a bind parameter and never as text.

The interval literal both generate_series and date_bin are given, as a bind parameter and never as text.

Attributes

def lastBucketStart: OffsetDateTime

The start of the last bucket that begins before until.

The start of the last bucket that begins before until.

Same reasoning as HistogramRequest.lastBucketStart: generate_series(from, until, width) emits a bucket starting at until whenever the span divides evenly, which is a permanent trailing zero bar on every chart whose window is a round number of hours — and every window here is.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product