mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-24 02:11:26 +01:00
Support typed errors. Misc formatting
This commit is contained in:
@@ -60,7 +60,11 @@ public struct Into<O: DynamicObject>: Hashable {
|
||||
*/
|
||||
public init() {
|
||||
|
||||
self.init(entityClass: O.self, configuration: nil, inferStoreIfPossible: true)
|
||||
self.init(
|
||||
entityClass: O.self,
|
||||
configuration: nil,
|
||||
inferStoreIfPossible: true
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,9 +74,15 @@ public struct Into<O: DynamicObject>: Hashable {
|
||||
```
|
||||
- parameter entity: the `NSManagedObject` or `CoreStoreObject` type to be created
|
||||
*/
|
||||
public init(_ entity: O.Type) {
|
||||
|
||||
self.init(entityClass: entity, configuration: nil, inferStoreIfPossible: true)
|
||||
public init(
|
||||
_ entity: O.Type
|
||||
) {
|
||||
|
||||
self.init(
|
||||
entityClass: entity,
|
||||
configuration: nil,
|
||||
inferStoreIfPossible: true
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,9 +92,15 @@ public struct Into<O: DynamicObject>: Hashable {
|
||||
```
|
||||
- parameter configuration: the `NSPersistentStore` configuration name to associate the object to. This parameter is required if multiple configurations contain the created `NSManagedObject`'s or `CoreStoreObject`'s entity type. Set to `nil` to use the default configuration.
|
||||
*/
|
||||
public init(_ configuration: ModelConfiguration) {
|
||||
|
||||
self.init(entityClass: O.self, configuration: configuration, inferStoreIfPossible: false)
|
||||
public init(
|
||||
_ configuration: ModelConfiguration
|
||||
) {
|
||||
|
||||
self.init(
|
||||
entityClass: O.self,
|
||||
configuration: configuration,
|
||||
inferStoreIfPossible: false
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,9 +111,16 @@ public struct Into<O: DynamicObject>: Hashable {
|
||||
- parameter entity: the `NSManagedObject` or `CoreStoreObject` 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 or `CoreStoreObject`'s entity type. Set to `nil` to use the default configuration.
|
||||
*/
|
||||
public init(_ entity: O.Type, _ configuration: ModelConfiguration) {
|
||||
|
||||
self.init(entityClass: entity, configuration: configuration, inferStoreIfPossible: false)
|
||||
public init(
|
||||
_ entity: O.Type,
|
||||
_ configuration: ModelConfiguration
|
||||
) {
|
||||
|
||||
self.init(
|
||||
entityClass: entity,
|
||||
configuration: configuration,
|
||||
inferStoreIfPossible: false
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -125,8 +148,12 @@ public struct Into<O: DynamicObject>: Hashable {
|
||||
|
||||
internal let inferStoreIfPossible: Bool
|
||||
|
||||
internal init(entityClass: O.Type, configuration: ModelConfiguration, inferStoreIfPossible: Bool) {
|
||||
|
||||
internal init(
|
||||
entityClass: O.Type,
|
||||
configuration: ModelConfiguration,
|
||||
inferStoreIfPossible: Bool
|
||||
) {
|
||||
|
||||
self.entityClass = entityClass
|
||||
self.configuration = configuration
|
||||
self.inferStoreIfPossible = inferStoreIfPossible
|
||||
|
||||
Reference in New Issue
Block a user