SchemaEvolution

zio.blocks.projection.SchemaEvolution

Detects schema drift via SchemaHash and rebuilds or migrates projection stores.

Attributes

Source
SchemaEvolution.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def bulkRebuildPending(specs: List[Projection[_]], stores: Map[String, ProjectionStore[_]], eventStores: Map[String, EventStore[_]], pendingRef: Ref[Map[String, Boolean]], migrations: Map[String, Migration[_, _]], config: SchemaEvolutionConfig): Task[Unit]

Attributes

Source
SchemaEvolution.scala
def checkAndRebuild[A : Schema : EntityPath](store: ProjectionStore[A], eventStore: EventStore[_], spec: Projection[A], config: SchemaEvolutionConfig = ..., migrationOpt: Option[Migration[_, A]] = ...): Task[Boolean]

Attributes

Source
SchemaEvolution.scala
def isSimpleAddFieldMigration(migration: Migration[_, _]): Boolean

Attributes

Source
SchemaEvolution.scala
def lazyRebuildIfNeeded[A : Schema : EntityPath](store: ProjectionStore[A], eventStore: EventStore[_], spec: Projection[A], pendingRef: Ref[Map[String, Boolean]], rebuildSem: Semaphore, migrationOpt: Option[Migration[_, A]] = ...): Task[Unit]

Attributes

Source
SchemaEvolution.scala
def needsRebuild[A : Schema](store: ProjectionStore[A]): Task[Boolean]

Attributes

Source
SchemaEvolution.scala
def rebuild[A](store: ProjectionStore[A], eventStore: EventStore[_], spec: Projection[A], currentHash: String): Task[Unit]

Attributes

Source
SchemaEvolution.scala
def rebuildWithHash[A : Schema : EntityPath](store: ProjectionStore[A], eventStore: EventStore[_], spec: Projection[A]): Task[Unit]

Attributes

Source
SchemaEvolution.scala
def registerMigration[Old, New : Schema : EntityPath](migration: Migration[Old, New], registry: Ref[Map[String, Migration[_, _]]], specName: String): Task[Unit]

Attributes

Source
SchemaEvolution.scala
def tryMigrationShortcut[A : Schema : EntityPath](store: ProjectionStore[A], migrationOpt: Option[Migration[_, A]], currentHash: String): Task[Boolean]

Attributes

Source
SchemaEvolution.scala
def tryMigrationShortcutForSpec(spec: Projection[_], store: ProjectionStore[_], migrationOpt: Option[Migration[_, _]], currentHash: String): Task[Boolean]

Attributes

Source
SchemaEvolution.scala