OfPatcherDefinition

io.scalaland.chimney.dsl.PatcherPatchedValueFlagsDsl.OfPatcherDefinition
final class OfPatcherDefinition[A, Patch, Overrides <: PatcherOverrides, Flags <: PatcherFlags, ObjPath <: Path](val castedTarget: Any)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def appendCollectionInPatch: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Enable[AppendCollectionInPatch, Flags]]

In case when both object to patch and patch value contain field with a collection, this option allows to append value from patch to the source value, rather than overriding it.

In case when both object to patch and patch value contain field with a collection, this option allows to append value from patch to the source value, rather than overriding it.

By default, patch's collection overrides the content of a field.

Attributes

See also
Since

1.7.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)
def clearOnNoneInPatch: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Disable[IgnoreNoneInPatch, Flags]]

When scala.Option is patching scala.Option, on scala.None value will be cleared.

When scala.Option is patching scala.Option, on scala.None value will be cleared.

Attributes

See also
Since

0.8.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)
def failRedundantPatcherFields: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Disable[IgnoreRedundantPatcherFields, Flags]]

Fail the compilation if there is a redundant field in patching object.

Fail the compilation if there is a redundant field in patching object.

Attributes

See also
Since

0.8.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)
def ignoreLeftInPatch: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Enable[IgnoreLeftInPatch, Flags]]

In case when both object to patch and patch value contain field of type scala.Either, this option allows to treat scala.Left value in patch as if the value was not provided.

In case when both object to patch and patch value contain field of type scala.Either, this option allows to treat scala.Left value in patch as if the value was not provided.

By default, when scala.Left is delivered in patch, Chimney used this new value.

Attributes

See also
Since

1.7.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)
def ignoreNoneInPatch: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Enable[IgnoreNoneInPatch, Flags]]

In case when both object to patch and patch value contain field of type scala.Option, this option allows to treat scala.None value in patch as if the value was not provided.

In case when both object to patch and patch value contain field of type scala.Option, this option allows to treat scala.None value in patch as if the value was not provided.

By default, when scala.None is delivered in patch, Chimney clears the value of such field on patching.

Attributes

See also
Since

0.4.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)
def ignoreRedundantPatcherFields: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Enable[IgnoreRedundantPatcherFields, Flags]]

In case that patch object contains a redundant field (i.e. field that is not present in patched object type), this option enables ignoring value of such fields and generate patch successfully.

In case that patch object contains a redundant field (i.e. field that is not present in patched object type), this option enables ignoring value of such fields and generate patch successfully.

By default, when Chimney detects a redundant field in patch object, it fails the compilation in order to prevent silent oversight of field name typos.

Attributes

See also
Since

0.4.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)
def overrideCollectionInPatch: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Disable[AppendCollectionInPatch, Flags]]

When collection is patching collection, the value will be simply overriden.

When collection is patching collection, the value will be simply overriden.

Attributes

See also
Since

1.7.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)
def useLeftOnLeftInPatch: { type At = [PatchedValueFlags <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, PatchedValue[ObjPath, PatchedValueFlags, Flags]]; }#<none>[Disable[IgnoreLeftInPatch, Flags]]

When scala.Either is patching scala.Either, on scala.Left value will be overrides.

When scala.Either is patching scala.Either, on scala.Left value will be overrides.

Attributes

See also
Since

1.7.0

Inherited from:
PatcherPatchedValueFlagsDsl (hidden)