mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-17 23:14:05 +01:00
WIP: documentations
This commit is contained in:
@@ -64,11 +64,11 @@ public struct Into<D: DynamicObject>: Hashable {
|
||||
}
|
||||
|
||||
/**
|
||||
Initializes an `Into` clause with the specified entity type.
|
||||
Initializes an `Into` clause 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.self))
|
||||
let person = transaction.create(Into<MyPersonEntity>(MyEmployeeEntity.self))
|
||||
```
|
||||
- parameter entity: the `NSManagedObject` type to be created
|
||||
- parameter entity: the `NSManagedObject` or `CoreStoreObject` type to be created
|
||||
*/
|
||||
public init(_ entity: D.Type) {
|
||||
|
||||
@@ -80,7 +80,7 @@ public struct Into<D: DynamicObject>: Hashable {
|
||||
```
|
||||
let person = transaction.create(Into<MyPersonEntity>("Configuration1"))
|
||||
```
|
||||
- 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.
|
||||
- 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) {
|
||||
|
||||
@@ -88,12 +88,12 @@ public struct Into<D: DynamicObject>: Hashable {
|
||||
}
|
||||
|
||||
/**
|
||||
Initializes an `Into` clause with the specified entity type and configuration.
|
||||
Initializes an `Into` clause 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.self, "Configuration1"))
|
||||
let person = transaction.create(Into<MyPersonEntity>(MyEmployeeEntity.self, "Configuration1"))
|
||||
```
|
||||
- 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.
|
||||
- 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: D.Type, _ configuration: ModelConfiguration) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user