class Movie::Persistence::EventProjection

Overview

Typed manifest dispatch for one logical projection. The erased handler stored in the registry decodes directly into the registered event type.

Defined in:

movie/persistence/projection.cr

Constructors

Instance Method Summary

Constructor Detail

def self.for(type : T.class, name : String) : self forall T #

[View source]
def self.new(name : String, entity_type : String | Nil = nil) #

[View source]

Instance Method Detail

def entity_type : String | Nil #

[View source]
def handler_for(event : EventEnvelope) : ProjectionHandler #

[View source]
def id : ProjectionId #

[View source]
def ignore(type : E.class, manifest : String = type.name) : self forall E #

[View source]
def ignore(manifest : String) : self #

[View source]
def name : String #

[View source]
def on(type : E.class, manifest : String = type.name, &handler : E, EventEnvelope, ProjectionTransaction -> ) : self forall E #

[View source]