Into
public struct Into<O> : Hashable where O : DynamicObject
extension Into: CustomDebugStringConvertible, CoreStoreDebugStringConvertible
An Into clause contains the destination entity and destination persistent store for a create(...) method. A common usage is to just indicate the entity:
let person = transaction.create(Into<MyPersonEntity>())
For cases where multiple NSPersistentStores contain the same entity, the destination configuration’s name needs to be specified as well:
let person = transaction.create(Into<MyPersonEntity>("Configuration1"))
-
The associated
NSManagedObjectorCoreStoreObjectentity classDeclaration
Swift
public let entityClass: O.Type -
The
NSPersistentStoreconfiguration name to associate objects from. May contain aStringto pertain to a named configuration, ornilto pertain to the default configurationDeclaration
Swift
public let configuration: ModelConfiguration -
Initializes an
Intoclause.let person = transaction.create(Into<MyPersonEntity>())Declaration
Swift
public init() -
Initializes an
Intoclause with the specified entity type. This is useful for querying a subclass while binding the generic type with a base class.let person = transaction.create(Into<MyPersonEntity>(MyEmployeeEntity.self))Declaration
Swift
public init(_ entity: O.Type)Parameters
entitythe
NSManagedObjectorCoreStoreObjecttype to be created -
Initializes an
Intoclause with the specified configuration.let person = transaction.create(Into<MyPersonEntity>("Configuration1"))Declaration
Swift
public init(_ configuration: ModelConfiguration)Parameters
configurationthe
NSPersistentStoreconfiguration name to associate the object to. This parameter is required if multiple configurations contain the createdNSManagedObject‘s orCoreStoreObject’s entity type. Set tonilto use the default configuration. -
Initializes an
Intoclause with the specified entity type and configuration. This is useful for querying a subclass while binding the generic type with a base class.let person = transaction.create(Into<MyPersonEntity>(MyEmployeeEntity.self, "Configuration1"))Declaration
Swift
public init(_ entity: O.Type, _ configuration: ModelConfiguration)Parameters
entitythe
NSManagedObjectorCoreStoreObjecttype to be createdconfigurationthe
NSPersistentStoreconfiguration name to associate the object to. This parameter is required if multiple configurations contain the createdNSManagedObject‘s orCoreStoreObject’s entity type. Set tonilto use the default configuration.
-
Declaration
Swift
public static func == <U, V>(lhs: Into<U>, rhs: Into<V>) -> Bool where U : DynamicObject, V : DynamicObject
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Declaration
Swift
public var debugDescription: String { get }
View on GitHub
Into Structure Reference