Support typed errors. Misc formatting

This commit is contained in:
John Estropia
2024-09-10 11:14:39 +09:00
parent c9e091a6a4
commit 5dcf29011a
74 changed files with 3987 additions and 1441 deletions

View File

@@ -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