mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-21 00:49:20 +01:00
WIP: query chains!
This commit is contained in:
@@ -39,12 +39,12 @@ import CoreData
|
||||
let person = transaction.create(Into<MyPersonEntity>("Configuration1"))
|
||||
```
|
||||
*/
|
||||
public struct Into<T: DynamicObject>: Hashable {
|
||||
public struct Into<D: DynamicObject>: Hashable {
|
||||
|
||||
/**
|
||||
The associated `NSManagedObject` or `CoreStoreObject` entity class
|
||||
*/
|
||||
public let entityClass: T.Type
|
||||
public let entityClass: D.Type
|
||||
|
||||
/**
|
||||
The `NSPersistentStore` configuration name to associate objects from.
|
||||
@@ -60,7 +60,7 @@ public struct Into<T: DynamicObject>: Hashable {
|
||||
*/
|
||||
public init() {
|
||||
|
||||
self.init(entityClass: T.self, configuration: nil, inferStoreIfPossible: true)
|
||||
self.init(entityClass: D.self, configuration: nil, inferStoreIfPossible: true)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ public struct Into<T: DynamicObject>: Hashable {
|
||||
```
|
||||
- parameter entity: the `NSManagedObject` type to be created
|
||||
*/
|
||||
public init(_ entity: T.Type) {
|
||||
public init(_ entity: D.Type) {
|
||||
|
||||
self.init(entityClass: entity, configuration: nil, inferStoreIfPossible: true)
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public struct Into<T: DynamicObject>: Hashable {
|
||||
*/
|
||||
public init(_ configuration: ModelConfiguration) {
|
||||
|
||||
self.init(entityClass: T.self, configuration: configuration, inferStoreIfPossible: false)
|
||||
self.init(entityClass: D.self, configuration: configuration, inferStoreIfPossible: false)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,7 +95,7 @@ public struct Into<T: DynamicObject>: Hashable {
|
||||
- parameter entity: the `NSManagedObject` type to be created
|
||||
- parameter configuration: the `NSPersistentStore` configuration name to associate the object to. This parameter is required if multiple configurations contain the created `NSManagedObject`'s entity type. Set to `nil` to use the default configuration.
|
||||
*/
|
||||
public init(_ entity: T.Type, _ configuration: ModelConfiguration) {
|
||||
public init(_ entity: D.Type, _ configuration: ModelConfiguration) {
|
||||
|
||||
self.init(entityClass: entity, configuration: configuration, inferStoreIfPossible: false)
|
||||
}
|
||||
@@ -125,7 +125,7 @@ public struct Into<T: DynamicObject>: Hashable {
|
||||
|
||||
internal let inferStoreIfPossible: Bool
|
||||
|
||||
internal init(entityClass: T.Type, configuration: ModelConfiguration, inferStoreIfPossible: Bool) {
|
||||
internal init(entityClass: D.Type, configuration: ModelConfiguration, inferStoreIfPossible: Bool) {
|
||||
|
||||
self.entityClass = entityClass
|
||||
self.configuration = configuration
|
||||
|
||||
Reference in New Issue
Block a user