CustomSchemaMappingProvider

public class CustomSchemaMappingProvider : Hashable, SchemaMappingProvider

A SchemaMappingProvider that accepts custom mappings for some entities. Mappings of entities with no CustomMapping provided will be automatically calculated if possible.

  • The source model version for the mapping.

    Declaration

    Swift

    public let sourceVersion: ModelVersion
  • The destination model version for the mapping.

    Declaration

    Swift

    public let destinationVersion: ModelVersion
  • Creates a CustomSchemaMappingProvider

    Declaration

    Swift

    public required init(from sourceVersion: ModelVersion, to destinationVersion: ModelVersion, entityMappings: Set<CustomMapping> = [])

    Parameters

    sourceVersion

    the source model version for the mapping

    destinationVersion

    the destination model version for the mapping

    entityMappings

    a list of CustomMappings. Mappings of entities with no CustomMapping provided will be automatically calculated if possible. Any conflicts or ambiguity will raise an assertion.

CustomMapping

  • Provides the type of mapping for an entity. Mappings of entities with no CustomMapping provided will be automatically calculated if possible. Any conflicts or ambiguity will raise an assertion.

    See more

    Declaration

    Swift

    public enum CustomMapping : Hashable

UnsafeSourceObject

  • The read-only proxy object used for the source object in a mapping’s Transformer closure. Properties can be accessed either by keyPath string or by NSAttributeDescription.

    See more

    Declaration

    Swift

    public final class UnsafeSourceObject

UnsafeDestinationObject

  • The read-write proxy object used for the destination object that can be created in a mapping’s Transformer closure. Properties can be accessed and mutated either through keyPath string or by NSAttributeDescription.

    See more

    Declaration

    Swift

    public final class UnsafeDestinationObject

Equatable

  • Declaration

    Swift

    public static func == (lhs: CustomSchemaMappingProvider, rhs: CustomSchemaMappingProvider) -> Bool

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

SchemaMappingProvider