DynamicValueMergeStrategy

zio.blocks.schema.DynamicValueMergeStrategy
See theDynamicValueMergeStrategy companion trait

Attributes

Companion
trait
Source
DynamicValueMergeStrategy.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case object Auto extends DynamicValueMergeStrategy

Deep merge: recursively merge all containers. Records merge by field name, Sequences merge by index, Maps merge by key. At leaves, right value wins.

Deep merge: recursively merge all containers. Records merge by field name, Sequences merge by index, Maps merge by key. At leaves, right value wins.

Attributes

Source
DynamicValueMergeStrategy.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Auto.type
case object Concat extends DynamicValueMergeStrategy

Concatenate sequences instead of merging by index. Records and Maps are still merged by key recursively.

Concatenate sequences instead of merging by index. Records and Maps are still merged by key recursively.

Attributes

Source
DynamicValueMergeStrategy.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Concat.type

Custom merge strategy with full control over recursion and merging.

Custom merge strategy with full control over recursion and merging.

Value parameters

f

A function that takes (path, left, right) and returns the merged DynamicValue

r

A function that determines whether to recurse into containers (default: always recurse for containers)

Attributes

Source
DynamicValueMergeStrategy.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object KeepLeft extends DynamicValueMergeStrategy

Always take left value, never recurse.

Always take left value, never recurse.

Attributes

Source
DynamicValueMergeStrategy.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
KeepLeft.type
case object Replace extends DynamicValueMergeStrategy

Complete replacement: no merging at any level. Right value completely replaces left value.

Complete replacement: no merging at any level. Right value completely replaces left value.

Attributes

Source
DynamicValueMergeStrategy.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Replace.type
case object Shallow extends DynamicValueMergeStrategy

Shallow merge: merge only at the root level, no recursion. Top-level record fields, sequence indices, or map keys are merged, but nested containers are replaced (right wins).

Shallow merge: merge only at the root level, no recursion. Top-level record fields, sequence indices, or map keys are merged, but nested containers are replaced (right wins).

Attributes

Source
DynamicValueMergeStrategy.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Shallow.type

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala