WIP: documentations

This commit is contained in:
John Rommel Estropia
2017-10-24 00:31:27 +09:00
parent e37186da73
commit b6ee0b014f
13 changed files with 444 additions and 54 deletions

View File

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