Patch

zio.blocks.schema.patch.Patch
See thePatch companion class
object Patch

Companion object providing smart constructors for type-safe patches.

Use these methods to create patches instead of the private constructor.

Attributes

Companion
class
Source
Patch.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Patch.type

Members list

Type members

Types

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala
type MapOp = MapOp

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala
type SeqOp = SeqOp

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala

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

Value members

Concrete methods

def addDuration[S](optic: Optic[S, Instant], duration: Duration): Patch[S]

Adds a duration to a temporal field.

Adds a duration to a temporal field.

Attributes

Source
Patch.scala
def addDuration[S](optic: Optic[S, Duration], duration: Duration)(implicit d: ForDuration.type): Patch[S]

Add a duration to a Duration field.

Add a duration to a Duration field.

Attributes

Source
Patch.scala
def addKey[S, K, V](optic: Optic[S, Map[K, V]], key: K, value: V): Patch[S]

Adds a key-value pair to a map.

Adds a key-value pair to a map.

Attributes

Source
Patch.scala
def addPeriod[S](optic: Optic[S, LocalDate], period: Period): Patch[S]

Adds a period to a date field.

Adds a period to a date field.

Attributes

Source
Patch.scala
def addPeriod[S](optic: Optic[S, Period], period: Period)(implicit d: ForPeriod.type): Patch[S]

Add a period to a Period field.

Add a period to a Period field.

Attributes

Source
Patch.scala
def addPeriodAndDuration[S](optic: Optic[S, LocalDateTime], period: Period, duration: Duration): Patch[S]

Add a period and duration to a LocalDateTime field.

Add a period and duration to a LocalDateTime field.

Attributes

Source
Patch.scala
def append[S, A](optic: Optic[S, Vector[A]], elements: Vector[A])(implicit d: ForVector.type): Patch[S]

Appends elements to the end of a sequence.

Appends elements to the end of a sequence.

Attributes

Source
Patch.scala
def append[S, A](optic: Optic[S, List[A]], elements: List[A])(implicit d: ForList.type): Patch[S]

Append elements to the end of a List.

Append elements to the end of a List.

Attributes

Source
Patch.scala
def append[S, A](optic: Optic[S, Seq[A]], elements: Seq[A])(implicit d: ForSeq.type): Patch[S]

Append elements to the end of a Seq.

Append elements to the end of a Seq.

Attributes

Source
Patch.scala
def append[S, A](optic: Optic[S, IndexedSeq[A]], elements: IndexedSeq[A])(implicit d: ForIndexedSeq.type): Patch[S]

Append elements to the end of an IndexedSeq.

Append elements to the end of an IndexedSeq.

Attributes

Source
Patch.scala
def append[S, A](optic: Optic[S, LazyList[A]], elements: LazyList[A])(implicit d: ForLazyList.type): Patch[S]

Append elements to the end of a LazyList.

Append elements to the end of a LazyList.

Attributes

Source
Patch.scala
def deleteAt[S, A](optic: Optic[S, Vector[A]], index: Int, count: Int)(implicit d: ForVector.type): Patch[S]

Deletes elements from a sequence starting at the given index.

Deletes elements from a sequence starting at the given index.

Attributes

Source
Patch.scala
def deleteAt[S, A](optic: Optic[S, List[A]], index: Int, count: Int)(implicit d: ForList.type): Patch[S]

Delete elements from a List starting at the given index.

Delete elements from a List starting at the given index.

Attributes

Source
Patch.scala
def deleteAt[S, A](optic: Optic[S, Seq[A]], index: Int, count: Int)(implicit d: ForSeq.type): Patch[S]

Delete elements from a Seq starting at the given index.

Delete elements from a Seq starting at the given index.

Attributes

Source
Patch.scala
def deleteAt[S, A](optic: Optic[S, IndexedSeq[A]], index: Int, count: Int)(implicit d: ForIndexedSeq.type): Patch[S]

Delete elements from an IndexedSeq starting at the given index.

Delete elements from an IndexedSeq starting at the given index.

Attributes

Source
Patch.scala
def deleteAt[S, A](optic: Optic[S, LazyList[A]], index: Int, count: Int)(implicit d: ForLazyList.type): Patch[S]

Delete elements from a LazyList starting at the given index.

Delete elements from a LazyList starting at the given index.

Attributes

Source
Patch.scala
def editString[S](optic: Optic[S, String], edits: Chunk[StringOp]): Patch[S]

Edits a string field using a sequence of insert/delete operations.

Edits a string field using a sequence of insert/delete operations.

Attributes

Source
Patch.scala
def empty[S](implicit schema: Schema[S]): Patch[S]

Creates an empty patch (identity element for composition).

Creates an empty patch (identity element for composition).

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, Int], delta: Int): Patch[S]

Increments a numeric field by a delta value.

Increments a numeric field by a delta value.

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, Long], delta: Long): Patch[S]

Increment a Long field by a delta value.

Increment a Long field by a delta value.

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, Double], delta: Double): Patch[S]

Increment a Double field by a delta value.

Increment a Double field by a delta value.

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, Float], delta: Float): Patch[S]

Increment a Float field by a delta value.

Increment a Float field by a delta value.

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, Short], delta: Short): Patch[S]

Increment a Short field by a delta value.

Increment a Short field by a delta value.

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, Byte], delta: Byte): Patch[S]

Increment a Byte field by a delta value.

Increment a Byte field by a delta value.

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, BigInt], delta: BigInt): Patch[S]

Increment a BigInt field by a delta value.

Increment a BigInt field by a delta value.

Attributes

Source
Patch.scala
def increment[S](optic: Optic[S, BigDecimal], delta: BigDecimal): Patch[S]

Increment a BigDecimal field by a delta value.

Increment a BigDecimal field by a delta value.

Attributes

Source
Patch.scala
def insertAt[S, A](optic: Optic[S, Vector[A]], index: Int, elements: Vector[A])(implicit d: ForVector.type): Patch[S]

Inserts elements at a specific index in a sequence.

Inserts elements at a specific index in a sequence.

Attributes

Source
Patch.scala
def insertAt[S, A](optic: Optic[S, List[A]], index: Int, elements: List[A])(implicit d: ForList.type): Patch[S]

Insert elements at a specific index in a List.

Insert elements at a specific index in a List.

Attributes

Source
Patch.scala
def insertAt[S, A](optic: Optic[S, Seq[A]], index: Int, elements: Seq[A])(implicit d: ForSeq.type): Patch[S]

Insert elements at a specific index in a Seq.

Insert elements at a specific index in a Seq.

Attributes

Source
Patch.scala
def insertAt[S, A](optic: Optic[S, IndexedSeq[A]], index: Int, elements: IndexedSeq[A])(implicit d: ForIndexedSeq.type): Patch[S]

Insert elements at a specific index in an IndexedSeq.

Insert elements at a specific index in an IndexedSeq.

Attributes

Source
Patch.scala
def insertAt[S, A](optic: Optic[S, LazyList[A]], index: Int, elements: LazyList[A])(implicit d: ForLazyList.type): Patch[S]

Insert elements at a specific index in a LazyList.

Insert elements at a specific index in a LazyList.

Attributes

Source
Patch.scala
def modifyAt[S, A](optic: Optic[S, Vector[A]], index: Int, elementPatch: Patch[A])(implicit d: ForVector.type): Patch[S]

Modifies an element at a specific index in a sequence using a nested patch.

Modifies an element at a specific index in a sequence using a nested patch.

Attributes

Source
Patch.scala
def modifyAt[S, A](optic: Optic[S, List[A]], index: Int, elementPatch: Patch[A])(implicit d: ForList.type): Patch[S]

Modify an element at a specific index in a List.

Modify an element at a specific index in a List.

Attributes

Source
Patch.scala
def modifyAt[S, A](optic: Optic[S, Seq[A]], index: Int, elementPatch: Patch[A])(implicit d: ForSeq.type): Patch[S]

Modify an element at a specific index in a Seq.

Modify an element at a specific index in a Seq.

Attributes

Source
Patch.scala
def modifyAt[S, A](optic: Optic[S, IndexedSeq[A]], index: Int, elementPatch: Patch[A])(implicit d: ForIndexedSeq.type): Patch[S]

Modify an element at a specific index in an IndexedSeq.

Modify an element at a specific index in an IndexedSeq.

Attributes

Source
Patch.scala
def modifyAt[S, A](optic: Optic[S, LazyList[A]], index: Int, elementPatch: Patch[A])(implicit d: ForLazyList.type): Patch[S]

Modify an element at a specific index in a LazyList.

Modify an element at a specific index in a LazyList.

Attributes

Source
Patch.scala
def modifyKey[S, K, V](optic: Optic[S, Map[K, V]], key: K, valuePatch: Patch[V]): Patch[S]

Modifies the value at a key in a map using a nested patch.

Modifies the value at a key in a map using a nested patch.

Attributes

Source
Patch.scala
def removeKey[S, K, V](optic: Optic[S, Map[K, V]], key: K): Patch[S]

Removes a key from a map.

Removes a key from a map.

Attributes

Source
Patch.scala
def replace[S, A](lens: Lens[S, A], a: A): Patch[S]

Replace a field value using a Lens.

Replace a field value using a Lens.

Attributes

Source
Patch.scala
def replace[S, A](optional: Optional[S, A], a: A): Patch[S]

Replace a value using an Optional.

Replace a value using an Optional.

Attributes

Source
Patch.scala
def replace[S, A](traversal: Traversal[S, A], a: A): Patch[S]

Replace all elements using a Traversal.

Replace all elements using a Traversal.

Attributes

Source
Patch.scala
def replace[S, A <: S](prism: Prism[S, A], a: A): Patch[S]

Replace a variant case using a Prism.

Replace a variant case using a Prism.

Attributes

Source
Patch.scala
def set[S, A](optic: Optic[S, A], value: A): Patch[S]

Sets a field/element to a specific value using an optic.

Sets a field/element to a specific value using an optic.

Attributes

Source
Patch.scala
def set[S, A](lens: Lens[S, A], value: A): Patch[S]

Set a field value using a Lens.

Set a field value using a Lens.

Attributes

Source
Patch.scala
def set[S, A](optional: Optional[S, A], value: A): Patch[S]

Set a value using an Optional.

Set a value using an Optional.

Attributes

Source
Patch.scala
def set[S, A](traversal: Traversal[S, A], value: A): Patch[S]

Set all elements using a Traversal.

Set all elements using a Traversal.

Attributes

Source
Patch.scala
def set[S, A <: S](prism: Prism[S, A], value: A): Patch[S]

Set a variant case using a Prism.

Set a variant case using a Prism.

Attributes

Source
Patch.scala

Concrete fields

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala
val DynamicPatchOp: DynamicPatchOp.type

Attributes

Source
Patch.scala
val MapOp: MapOp.type

Attributes

Source
Patch.scala
val Operation: Operation.type

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala

Attributes

Source
Patch.scala
val SeqOp: SeqOp.type

Attributes

Source
Patch.scala
val StringOp: StringOp.type

Attributes

Source
Patch.scala