TargetStrategyApplier

zio.blocks.data.migration.TargetStrategyApplier

Applies a TargetStrategy, providing the actual table name to write to and handling shadow table lifecycle (create, write, swap).

Attributes

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

Members list

Value members

Concrete methods

def finalizePreview(tableName: String, strategy: TargetStrategy): List[String]

Pure finalize (swap/rename) statements for the given strategy.

Pure finalize (swap/rename) statements for the given strategy.

Attributes

Source
TargetStrategyApplier.scala
def finalizeTarget(tableName: String, strategy: TargetStrategy)(using con: DbCon): (String, String)

Finalizes the target: for shadow tables, performs the atomic swap. For in-place, no-op. Returns (oldTableName, newTableName) for shadow, or (tableName, tableName) for in-place.

Finalizes the target: for shadow tables, performs the atomic swap. For in-place, no-op. Returns (oldTableName, newTableName) for shadow, or (tableName, tableName) for in-place.

Attributes

Source
TargetStrategyApplier.scala
def prepare[E](table: Table[E], strategy: TargetStrategy)(using con: DbCon, dialect: Dialect): String

Prepares the target: for shadow tables, creates the shadow table. Returns the table name to write to.

Prepares the target: for shadow tables, creates the shadow table. Returns the table name to write to.

Attributes

Source
TargetStrategyApplier.scala
def preparePreview[E](table: Table[E], strategy: TargetStrategy)(using dialect: Dialect): Option[String]

Pure shadow-create DDL for the given dialect, if strategy is ShadowTable.

Pure shadow-create DDL for the given dialect, if strategy is ShadowTable.

Attributes

Source
TargetStrategyApplier.scala
def resolveTableName[E](table: Table[E], strategy: TargetStrategy): String

Resolves the effective target table name based on strategy.

Resolves the effective target table name based on strategy.

Attributes

Source
TargetStrategyApplier.scala