FromBuilder

zio.blocks.projection.FromBuilder
final class FromBuilder[A]

Chooses how the events of one named source are routed. It is returned by Projection.from, and each method returns the Projection with a new SourceBinding added. Handlers are attached afterwards with on.

Attributes

Source
Projection.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Applies every event from this source to the same store.

Applies every event from this source to the same store.

Attributes

Source
Projection.scala

Applies each event to the entity it was recorded under (ctx.entityId).

Applies each event to the entity it was recorded under (ctx.entityId).

Attributes

Source
Projection.scala
def routedBy[E](selector: E => String): Projection[A]

Routes each event by a key that selector reads from it, so that events with the same key are applied to the same group. This makes the projection ProjectionScope.CrossEntity.

Routes each event by a key that selector reads from it, so that events with the same key are applied to the same group. This makes the projection ProjectionScope.CrossEntity.

Attributes

Source
Projection.scala
inline def routedByField[E](inline selector: E => Any): Projection[A]

Like routedBy, but picks the key with a field selector such as _.ownerId, checked at compile time. The field's value is turned into the key with toString.

Like routedBy, but picks the key with a field selector such as _.ownerId, checked at compile time. The field's value is turned into the key with toString.

Attributes

Source
Projection.scala