AggregateProjection
zio.blocks.projection.AggregateProjection
object AggregateProjection
Helpers for global aggregate projections.
Global projections share a single underlying store file (global/.db) and receive events from all sources regardless of entity routing. The entity identifier acts as the grouping key (for example a date string "2025-08-26").
The store layer guarantees that Increment / Decrement / Max / Min FieldUpdates translate to atomic SQL (COALESCE(col,0)+?, MAX(...), MIN(...)) and that a missing aggregate row is materialised on-the-fly via INSERT OR IGNORE before the UPDATE. Upsert uses the SQLite INSERT ... ON CONFLICT DO UPDATE form (falls back to INSERT OR REPLACE when the driver does not advertise conflict support).
Attributes
- Source
- AggregateProjection.scala
- Graph
-
- Supertypes
- Self type
-
AggregateProjection.type
Members list
In this article