mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-26 11:21:18 +01:00
WIP: demo app
This commit is contained in:
@@ -38,7 +38,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the `NSManagedObject` instance if the object exists in the transaction, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObject(_ object: NSManagedObject) -> AnyObject? {
|
||||
|
||||
do {
|
||||
@@ -58,7 +57,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the `NSManagedObject` instance if the object exists in the transaction, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObjectWithID(_ objectID: NSManagedObjectID) -> AnyObject? {
|
||||
|
||||
do {
|
||||
@@ -78,7 +76,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the `NSManagedObject` array for objects that exists in the transaction
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObjects(_ objects: [NSManagedObject]) -> [AnyObject] {
|
||||
|
||||
return objects.flatMap { try? self.bridgeToSwift.context.existingObject(with: $0.objectID) }
|
||||
@@ -91,7 +88,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the `NSManagedObject` array for objects that exists in the transaction
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObjectsWithIDs(_ objectIDs: [NSManagedObjectID]) -> [AnyObject] {
|
||||
|
||||
return objectIDs.flatMap { try? self.bridgeToSwift.context.existingObject(with: $0) }
|
||||
@@ -105,7 +101,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the first `NSManagedObject` instance that satisfies the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchOneFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> AnyObject? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -123,7 +118,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: all `NSManagedObject` instances that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchAllFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> [AnyObject]? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -141,7 +135,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the number `NSManagedObject`s that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchCountFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> NSNumber? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -159,7 +152,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the `NSManagedObjectID` for the first `NSManagedObject` that satisfies the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchObjectIDFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> NSManagedObjectID? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -180,7 +172,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the result of the the query. The type of the return value is specified by the generic type of the `CSSelect` parameter.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func queryValueFrom(_ from: CSFrom, selectClause: CSSelect, queryClauses: [CSQueryClause]) -> AnyObject? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -201,7 +192,6 @@ public extension CSBaseDataTransaction {
|
||||
- returns: the result of the the query. The type of the return value is specified by the generic type of the `CSSelect` parameter.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func queryAttributesFrom(_ from: CSFrom, selectClause: CSSelect, queryClauses: [CSQueryClause]) -> [[NSString: AnyObject]]? {
|
||||
|
||||
CoreStore.assert(
|
||||
|
||||
@@ -44,7 +44,6 @@ public extension CSCoreStore {
|
||||
}
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSInMemoryStore` instance
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `CSSetupResult` argument indicates the result. This closure is NOT executed if an error is thrown, but will be executed with a failure `CSSetupResult` result if an error occurs asynchronously.
|
||||
*/
|
||||
@@ -68,7 +67,6 @@ public extension CSCoreStore {
|
||||
}
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSSQLiteStore` instance
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `CSSetupResult` argument indicates the result. This closure is NOT executed if an error is thrown, but will be executed with a failure `CSSetupResult` result if an error occurs asynchronously. Note that the `CSLocalStorage` associated to the `-[CSSetupResult storage]` may not always be the same instance as the parameter argument if a previous `CSLocalStorage` was already added at the same URL and with the same configuration.
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
@@ -101,7 +99,6 @@ public extension CSCoreStore {
|
||||
- returns: a `CSMigrationType` array indicating the migration steps required for the store, or an empty array if the file does not exist yet. Otherwise, `nil` is returned and the `error` argument is set if either inspection of the store failed, or if no mapping model was found/inferred.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func requiredMigrationsForSQLiteStore(_ storage: CSSQLiteStore, error: NSErrorPointer) -> [CSMigrationType]? {
|
||||
|
||||
return self.defaultStack.requiredMigrationsForSQLiteStore(storage, error: error)
|
||||
|
||||
@@ -40,7 +40,6 @@ public extension CSCoreStore {
|
||||
- returns: a `CSObjectMonitor` that monitors changes to `object`
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func monitorObject(_ object: NSManagedObject) -> CSObjectMonitor {
|
||||
|
||||
return self.defaultStack.monitorObject(object)
|
||||
@@ -54,7 +53,6 @@ public extension CSCoreStore {
|
||||
- returns: a `CSListMonitor` instance that monitors changes to the list
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func monitorListFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> CSListMonitor {
|
||||
|
||||
return self.defaultStack.monitorListFrom(from, fetchClauses: fetchClauses)
|
||||
@@ -86,7 +84,6 @@ public extension CSCoreStore {
|
||||
- returns: a `CSListMonitor` instance that monitors changes to the list
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func monitorSectionedListFrom(_ from: CSFrom, sectionBy: CSSectionBy, fetchClauses: [CSFetchClause]) -> CSListMonitor {
|
||||
|
||||
return self.defaultStack.monitorSectionedListFrom(
|
||||
|
||||
@@ -38,7 +38,6 @@ public extension CSCoreStore {
|
||||
- returns: the `NSManagedObject` instance if the object exists in the transaction, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchExistingObject(_ object: NSManagedObject) -> AnyObject? {
|
||||
|
||||
return self.defaultStack.fetchExistingObject(object)
|
||||
@@ -51,7 +50,6 @@ public extension CSCoreStore {
|
||||
- returns: the `NSManagedObject` instance if the object exists in the transaction, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchExistingObjectWithID(_ objectID: NSManagedObjectID) -> AnyObject? {
|
||||
|
||||
return self.defaultStack.fetchExistingObjectWithID(objectID)
|
||||
@@ -64,7 +62,6 @@ public extension CSCoreStore {
|
||||
- returns: the `NSManagedObject` array for objects that exists in the transaction
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchExistingObjects(_ objects: [NSManagedObject]) -> [AnyObject] {
|
||||
|
||||
return self.defaultStack.fetchExistingObjects(objects)
|
||||
@@ -77,7 +74,6 @@ public extension CSCoreStore {
|
||||
- returns: the `NSManagedObject` array for objects that exists in the transaction
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchExistingObjectsWithIDs(_ objectIDs: [NSManagedObjectID]) -> [AnyObject] {
|
||||
|
||||
return self.defaultStack.fetchExistingObjectsWithIDs(objectIDs)
|
||||
@@ -91,7 +87,6 @@ public extension CSCoreStore {
|
||||
- returns: the first `NSManagedObject` instance that satisfies the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchOneFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> AnyObject? {
|
||||
|
||||
return self.defaultStack.fetchOneFrom(from, fetchClauses: fetchClauses)
|
||||
@@ -105,7 +100,6 @@ public extension CSCoreStore {
|
||||
- returns: all `NSManagedObject` instances that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchAllFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> [AnyObject]? {
|
||||
|
||||
return self.defaultStack.fetchAllFrom(from, fetchClauses: fetchClauses)
|
||||
@@ -119,7 +113,6 @@ public extension CSCoreStore {
|
||||
- returns: the number `NSManagedObject`s that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchCountFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> NSNumber? {
|
||||
|
||||
return self.defaultStack.fetchCountFrom(from, fetchClauses: fetchClauses)
|
||||
@@ -133,7 +126,6 @@ public extension CSCoreStore {
|
||||
- returns: the `NSManagedObjectID` for the first `NSManagedObject` that satisfies the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchObjectIDFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> NSManagedObjectID? {
|
||||
|
||||
return self.defaultStack.fetchObjectIDFrom(from, fetchClauses: fetchClauses)
|
||||
@@ -147,7 +139,6 @@ public extension CSCoreStore {
|
||||
- returns: the `NSManagedObjectID` for all `NSManagedObject`s that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func fetchObjectIDsFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> [NSManagedObjectID]? {
|
||||
|
||||
return self.defaultStack.fetchObjectIDsFrom(from, fetchClauses: fetchClauses)
|
||||
@@ -164,7 +155,6 @@ public extension CSCoreStore {
|
||||
- returns: the result of the the query. The type of the return value is specified by the generic type of the `CSSelect` parameter.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func queryValueFrom(_ from: CSFrom, selectClause: CSSelect, queryClauses: [CSQueryClause]) -> AnyObject? {
|
||||
|
||||
return self.defaultStack.queryValueFrom(from, selectClause: selectClause, queryClauses: queryClauses)
|
||||
@@ -181,7 +171,6 @@ public extension CSCoreStore {
|
||||
- returns: the result of the the query. The type of the return value is specified by the generic type of the `CSSelect` parameter.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func queryAttributesFrom(_ from: CSFrom, selectClause: CSSelect, queryClauses: [CSQueryClause]) -> [[NSString: AnyObject]]? {
|
||||
|
||||
return self.defaultStack.queryAttributesFrom(from, selectClause: selectClause, queryClauses: queryClauses)
|
||||
|
||||
@@ -67,7 +67,7 @@ public extension CSCoreStore {
|
||||
@objc
|
||||
public static func entityDescriptionForClass(_ type: NSManagedObject.Type) -> NSEntityDescription? {
|
||||
|
||||
return CoreStore.entityDescriptionForType(type)
|
||||
return CoreStore.entityDescription(for: type)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,7 +75,6 @@ public extension CSCoreStore {
|
||||
```
|
||||
CSSQLiteStore *storage = [CSCoreStore addInMemoryStorageAndWaitAndReturnError:&error];
|
||||
```
|
||||
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSInMemoryStore` added to the `defaultStack`
|
||||
*/
|
||||
@@ -91,7 +90,6 @@ public extension CSCoreStore {
|
||||
```
|
||||
CSSQLiteStore *storage = [CSCoreStore addSQLiteStorageAndWaitAndReturnError:&error];
|
||||
```
|
||||
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSSQLiteStore` added to the `defaultStack`
|
||||
*/
|
||||
@@ -110,7 +108,6 @@ public extension CSCoreStore {
|
||||
addStorageAndWait: [[CSInMemoryStore alloc] initWithConfiguration: @"Config1"]
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSInMemoryStore`
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSInMemoryStore` added to the `defaultStack`
|
||||
@@ -130,7 +127,6 @@ public extension CSCoreStore {
|
||||
addStorageAndWait: [[CSSQLiteStore alloc] initWithConfiguration: @"Config1"]
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSSQLiteStore`
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSSQLiteStore` added to the `defaultStack`
|
||||
|
||||
@@ -70,7 +70,6 @@ public extension CSCoreStore {
|
||||
- returns: a `CSUnsafeDataTransaction` instance where creates, updates, and deletes can be made.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func beginUnsafe() -> CSUnsafeDataTransaction {
|
||||
|
||||
return bridge {
|
||||
@@ -86,7 +85,6 @@ public extension CSCoreStore {
|
||||
- returns: a `CSUnsafeDataTransaction` instance where creates, updates, and deletes can be made.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public static func beginUnsafeWithSupportsUndo(_ supportsUndo: Bool) -> CSUnsafeDataTransaction {
|
||||
|
||||
return bridge {
|
||||
|
||||
@@ -44,7 +44,6 @@ public extension CSDataStack {
|
||||
}
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSInMemoryStore` instance
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `CSSetupResult` argument indicates the result. This closure is NOT executed if an error is thrown, but will be executed with a failure `CSSetupResult` result if an error occurs asynchronously.
|
||||
*/
|
||||
@@ -72,7 +71,6 @@ public extension CSDataStack {
|
||||
}
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSSQLiteStore` instance
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `CSSetupResult` argument indicates the result. This closure is NOT executed if an error is thrown, but will be executed with a failure `CSSetupResult` result if an error occurs asynchronously. Note that the `CSLocalStorage` associated to the `-[CSSetupResult storage]` may not always be the same instance as the parameter argument if a previous `CSLocalStorage` was already added at the same URL and with the same configuration.
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
@@ -118,7 +116,6 @@ public extension CSDataStack {
|
||||
- returns: a `CSMigrationType` array indicating the migration steps required for the store, or an empty array if the file does not exist yet. Otherwise, `nil` is returned and the `error` argument is set if either inspection of the store failed, or if no mapping model was found/inferred.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func requiredMigrationsForSQLiteStore(_ storage: CSSQLiteStore, error: NSErrorPointer) -> [CSMigrationType]? {
|
||||
|
||||
return bridge(error) {
|
||||
|
||||
@@ -40,7 +40,6 @@ public extension CSDataStack {
|
||||
- returns: a `ObjectMonitor` that monitors changes to `object`
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func monitorObject(_ object: NSManagedObject) -> CSObjectMonitor {
|
||||
|
||||
return bridge {
|
||||
@@ -57,7 +56,6 @@ public extension CSDataStack {
|
||||
- returns: a `CSListMonitor` instance that monitors changes to the list
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func monitorListFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> CSListMonitor {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -124,7 +122,6 @@ public extension CSDataStack {
|
||||
- returns: a `CSListMonitor` instance that monitors changes to the list
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func monitorSectionedListFrom(_ from: CSFrom, sectionBy: CSSectionBy, fetchClauses: [CSFetchClause]) -> CSListMonitor {
|
||||
|
||||
CoreStore.assert(
|
||||
|
||||
@@ -38,7 +38,6 @@ public extension CSDataStack {
|
||||
- returns: the `NSManagedObject` instance if the object exists in the transaction, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObject(_ object: NSManagedObject) -> AnyObject? {
|
||||
|
||||
do {
|
||||
@@ -58,7 +57,6 @@ public extension CSDataStack {
|
||||
- returns: the `NSManagedObject` instance if the object exists in the transaction, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObjectWithID(_ objectID: NSManagedObjectID) -> AnyObject? {
|
||||
|
||||
do {
|
||||
@@ -78,7 +76,6 @@ public extension CSDataStack {
|
||||
- returns: the `NSManagedObject` array for objects that exists in the transaction
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObjects(_ objects: [NSManagedObject]) -> [AnyObject] {
|
||||
|
||||
return objects.flatMap { try? self.bridgeToSwift.mainContext.existingObject(with: $0.objectID) }
|
||||
@@ -91,7 +88,6 @@ public extension CSDataStack {
|
||||
- returns: the `NSManagedObject` array for objects that exists in the transaction
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchExistingObjectsWithIDs(_ objectIDs: [NSManagedObjectID]) -> [AnyObject] {
|
||||
|
||||
return objectIDs.flatMap { try? self.bridgeToSwift.mainContext.existingObject(with: $0) }
|
||||
@@ -105,7 +101,6 @@ public extension CSDataStack {
|
||||
- returns: the first `NSManagedObject` instance that satisfies the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchOneFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> AnyObject? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -123,7 +118,6 @@ public extension CSDataStack {
|
||||
- returns: all `NSManagedObject` instances that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchAllFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> [AnyObject]? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -141,7 +135,6 @@ public extension CSDataStack {
|
||||
- returns: the number `NSManagedObject`s that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchCountFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> NSNumber? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -159,7 +152,6 @@ public extension CSDataStack {
|
||||
- returns: the `NSManagedObjectID` for the first `NSManagedObject` that satisfies the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchObjectIDFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> NSManagedObjectID? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -177,7 +169,6 @@ public extension CSDataStack {
|
||||
- returns: the `NSManagedObjectID` for all `NSManagedObject`s that satisfy the specified `CSFetchClause`s
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func fetchObjectIDsFrom(_ from: CSFrom, fetchClauses: [CSFetchClause]) -> [NSManagedObjectID]? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -198,7 +189,6 @@ public extension CSDataStack {
|
||||
- returns: the result of the the query. The type of the return value is specified by the generic type of the `CSSelect` parameter.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func queryValueFrom(_ from: CSFrom, selectClause: CSSelect, queryClauses: [CSQueryClause]) -> AnyObject? {
|
||||
|
||||
CoreStore.assert(
|
||||
@@ -219,7 +209,6 @@ public extension CSDataStack {
|
||||
- returns: the result of the the query. The type of the return value is specified by the generic type of the `CSSelect` parameter.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func queryAttributesFrom(_ from: CSFrom, selectClause: CSSelect, queryClauses: [CSQueryClause]) -> [[NSString: AnyObject]]? {
|
||||
|
||||
CoreStore.assert(
|
||||
|
||||
@@ -70,7 +70,6 @@ public extension CSDataStack {
|
||||
- returns: a `CSUnsafeDataTransaction` instance where creates, updates, and deletes can be made.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func beginUnsafe() -> CSUnsafeDataTransaction {
|
||||
|
||||
return bridge {
|
||||
@@ -86,7 +85,6 @@ public extension CSDataStack {
|
||||
- returns: a `CSUnsafeDataTransaction` instance where creates, updates, and deletes can be made.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func beginUnsafeWithSupportsUndo(_ supportsUndo: Bool) -> CSUnsafeDataTransaction {
|
||||
|
||||
return bridge {
|
||||
|
||||
@@ -153,7 +153,7 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
|
||||
@objc
|
||||
public func entityDescriptionForClass(_ type: NSManagedObject.Type) -> NSEntityDescription? {
|
||||
|
||||
return self.bridgeToSwift.entityDescriptionForType(type)
|
||||
return self.bridgeToSwift.entityDescription(for: type)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,7 +161,6 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
|
||||
```
|
||||
CSSQLiteStore *storage = [dataStack addInMemoryStorageAndWaitAndReturnError:&error];
|
||||
```
|
||||
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSInMemoryStore` added to the stack
|
||||
*/
|
||||
@@ -180,7 +179,6 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
|
||||
```
|
||||
CSSQLiteStore *storage = [dataStack addSQLiteStorageAndWaitAndReturnError:&error];
|
||||
```
|
||||
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSSQLiteStore` added to the stack
|
||||
*/
|
||||
@@ -202,7 +200,6 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
|
||||
addStorageAndWait: [[CSInMemoryStore alloc] initWithConfiguration: @"Config1"]
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSInMemoryStore`
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSInMemoryStore` added to the stack
|
||||
@@ -225,7 +222,6 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
|
||||
addStorageAndWait: [[CSSQLiteStore alloc] initWithConfiguration: @"Config1"]
|
||||
error: &error];
|
||||
```
|
||||
|
||||
- parameter storage: the `CSSQLiteStore`
|
||||
- parameter error: the `NSError` pointer that indicates the reason in case of an failure
|
||||
- returns: the `CSSQLiteStore` added to the stack
|
||||
|
||||
@@ -68,7 +68,6 @@ public final class CSFrom: NSObject, CoreStoreObjectiveCType {
|
||||
```
|
||||
MyPersonEntity *people = [transaction fetchAllFrom:CSFromClass([MyPersonEntity class])];
|
||||
```
|
||||
|
||||
- parameter entityClass: the `NSManagedObject` class type to be created
|
||||
*/
|
||||
@objc
|
||||
@@ -83,7 +82,6 @@ public final class CSFrom: NSObject, CoreStoreObjectiveCType {
|
||||
MyPersonEntity *people = [transaction fetchAllFrom:
|
||||
CSFromClass([MyPersonEntity class], @"Config1")];
|
||||
```
|
||||
|
||||
- parameter configuration: the `NSPersistentStore` configuration name to associate objects from. This parameter is required if multiple configurations contain the created `NSManagedObject`'s entity type. Set to `[NSNull null]` to use the default configuration.
|
||||
*/
|
||||
@objc
|
||||
@@ -109,7 +107,6 @@ public final class CSFrom: NSObject, CoreStoreObjectiveCType {
|
||||
CSFromClass([MyPersonEntity class],
|
||||
@[[NSNull null], @"Config1"])];
|
||||
```
|
||||
|
||||
- parameter entity: the associated `NSManagedObject` entity class
|
||||
- parameter configurations: an array of the `NSPersistentStore` configuration names to associate objects from. This parameter is required if multiple configurations contain the created `NSManagedObject`'s entity type. Set to `[NSNull null]` to use the default configuration.
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,6 @@ public final class CSInto: NSObject, CoreStoreObjectiveCType {
|
||||
MyPersonEntity *person = [transaction createInto:
|
||||
CSIntoClass([MyPersonEntity class])];
|
||||
```
|
||||
|
||||
- parameter entityClass: the `NSManagedObject` class type to be created
|
||||
*/
|
||||
@objc
|
||||
@@ -77,7 +76,6 @@ public final class CSInto: NSObject, CoreStoreObjectiveCType {
|
||||
MyPersonEntity *person = [transaction createInto:
|
||||
CSIntoClass([MyPersonEntity class])];
|
||||
```
|
||||
|
||||
- parameter entityClass: the `NSManagedObject` class 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.
|
||||
*/
|
||||
|
||||
@@ -121,7 +121,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: `YES` if at least one object in any section exists, `NO` otherwise
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func hasObjects() -> Bool {
|
||||
|
||||
return self.bridgeToSwift.hasObjects()
|
||||
@@ -134,7 +133,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: `YES` if at least one object in the specified section exists, `NO` otherwise
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func hasObjectsInSection(_ section: Int) -> Bool {
|
||||
|
||||
return self.bridgeToSwift.hasObjectsInSection(section)
|
||||
@@ -146,7 +144,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: all objects in all sections
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func objectsInAllSections() -> [NSManagedObject] {
|
||||
|
||||
return self.bridgeToSwift.objectsInAllSections()
|
||||
@@ -159,7 +156,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: all objects in the specified section
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func objectsInSection(_ section: Int) -> [NSManagedObject] {
|
||||
|
||||
return self.bridgeToSwift.objectsInSection(section)
|
||||
@@ -172,7 +168,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: all objects in the specified section, or `nil` if out of bounds
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func objectsInSafeSection(safeSectionIndex section: Int) -> [NSManagedObject]? {
|
||||
|
||||
return self.bridgeToSwift.objectsInSection(safeSectionIndex: section)
|
||||
@@ -184,7 +179,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the number of sections
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func numberOfSections() -> Int {
|
||||
|
||||
return self.bridgeToSwift.numberOfSections()
|
||||
@@ -196,7 +190,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the number of objects in all sections
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func numberOfObjects() -> Int {
|
||||
|
||||
return self.bridgeToSwift.numberOfObjects()
|
||||
@@ -209,7 +202,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the number of objects in the specified section
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func numberOfObjectsInSection(_ section: Int) -> Int {
|
||||
|
||||
return self.bridgeToSwift.numberOfObjectsInSection(section)
|
||||
@@ -222,7 +214,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the number of objects in the specified section, or `nil` if out of bounds
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func numberOfObjectsInSafeSection(safeSectionIndex section: Int) -> NSNumber? {
|
||||
|
||||
return self.bridgeToSwift.numberOfObjectsInSection(safeSectionIndex: section)
|
||||
@@ -235,7 +226,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the `NSFetchedResultsSectionInfo` for the specified section
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func sectionInfoAtIndex(_ section: Int) -> NSFetchedResultsSectionInfo {
|
||||
|
||||
return self.bridgeToSwift.sectionInfoAtIndex(section)
|
||||
@@ -248,7 +238,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the `NSFetchedResultsSectionInfo` for the specified section, or `nil` if the section index is out of bounds.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func sectionInfoAtSafeSectionIndex(safeSectionIndex section: Int) -> NSFetchedResultsSectionInfo? {
|
||||
|
||||
return self.bridgeToSwift.sectionInfoAtIndex(safeSectionIndex: section)
|
||||
@@ -260,7 +249,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the `NSFetchedResultsSectionInfo`s for all sections
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func sections() -> [NSFetchedResultsSectionInfo] {
|
||||
|
||||
return self.bridgeToSwift.sections()
|
||||
@@ -274,7 +262,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the target section for the specified "Section Index" title and index.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func targetSectionForSectionIndexTitle(title: String, index: Int) -> Int {
|
||||
|
||||
return self.bridgeToSwift.targetSectionForSectionIndex(title: title, index: index)
|
||||
@@ -286,7 +273,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the section index titles for all sections
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func sectionIndexTitles() -> [String] {
|
||||
|
||||
return self.bridgeToSwift.sectionIndexTitles()
|
||||
@@ -299,7 +285,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the index of the `NSManagedObject` if it exists in the `CSListMonitor`'s fetched objects, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func indexOf(_ object: NSManagedObject) -> NSNumber? {
|
||||
|
||||
return self.bridgeToSwift.indexOf(object)
|
||||
@@ -312,7 +297,6 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
|
||||
- returns: the `NSIndexPath` of the `NSManagedObject` if it exists in the `ListMonitor`'s fetched objects, or `nil` if not found.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func indexPathOf(_ object: NSManagedObject) -> IndexPath? {
|
||||
|
||||
return self.bridgeToSwift.indexPathOf(object)
|
||||
|
||||
@@ -90,7 +90,7 @@ public final class CSMigrationResult: NSObject, CoreStoreObjectiveCType {
|
||||
- parameter failure: the block to execute on failure. The block passes an `NSError` argument that pertains to the actual error.
|
||||
*/
|
||||
@objc
|
||||
public func handleSuccess(@noescape _ success: (migrationTypes: [CSMigrationType]) -> Void, @noescape failure: (error: NSError) -> Void) {
|
||||
public func handleSuccess(_ success: @noescape (migrationTypes: [CSMigrationType]) -> Void, failure: @noescape (error: NSError) -> Void) {
|
||||
|
||||
switch self.bridgeToSwift {
|
||||
|
||||
@@ -110,7 +110,7 @@ public final class CSMigrationResult: NSObject, CoreStoreObjectiveCType {
|
||||
- parameter success: the block to execute on success. The block passes an array of `CSMigrationType`s that indicates the migration steps completed.
|
||||
*/
|
||||
@objc
|
||||
public func handleSuccess(@noescape _ success: (migrationTypes: [CSMigrationType]) -> Void) {
|
||||
public func handleSuccess(_ success: @noescape (migrationTypes: [CSMigrationType]) -> Void) {
|
||||
|
||||
guard case .success(let migrationTypes) = self.bridgeToSwift else {
|
||||
|
||||
@@ -127,7 +127,7 @@ public final class CSMigrationResult: NSObject, CoreStoreObjectiveCType {
|
||||
- parameter failure: the block to execute on failure. The block passes an `NSError` argument that pertains to the actual error.
|
||||
*/
|
||||
@objc
|
||||
public func handleFailure(@noescape _ failure: (error: NSError) -> Void) {
|
||||
public func handleFailure(_ failure: @noescape (error: NSError) -> Void) {
|
||||
|
||||
guard case .failure(let error) = self.bridgeToSwift else {
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ public final class CSOrderBy: NSObject, CSFetchClause, CSQueryClause, CSDeleteCl
|
||||
fetchAllFrom:CSFromClass([MyPersonEntity class])
|
||||
fetchClauses:@[CSOrderByKey(CSSortAscending(@"fullname"))]]];
|
||||
```
|
||||
|
||||
- parameter sortDescriptor: a `NSSortDescriptor`
|
||||
*/
|
||||
@objc
|
||||
@@ -69,7 +68,6 @@ public final class CSOrderBy: NSObject, CSFetchClause, CSQueryClause, CSDeleteCl
|
||||
fetchAllFrom:CSFromClass([MyPersonEntity class])
|
||||
fetchClauses:@[CSOrderByKeys(CSSortAscending(@"fullname"), CSSortDescending(@"age"), nil))]]];
|
||||
```
|
||||
|
||||
- parameter sortDescriptors: an array of `NSSortDescriptor`s
|
||||
*/
|
||||
@objc
|
||||
|
||||
@@ -90,7 +90,7 @@ public final class CSSaveResult: NSObject, CoreStoreObjectiveCType {
|
||||
- parameter failure: the block to execute on failure. The block passes an `NSError` argument that pertains to the actual error.
|
||||
*/
|
||||
@objc
|
||||
public func handleSuccess(@noescape _ success: (hasChanges: Bool) -> Void, @noescape failure: (error: NSError) -> Void) {
|
||||
public func handleSuccess(_ success: @noescape (hasChanges: Bool) -> Void, failure: @noescape (error: NSError) -> Void) {
|
||||
|
||||
switch self.bridgeToSwift {
|
||||
|
||||
@@ -110,7 +110,7 @@ public final class CSSaveResult: NSObject, CoreStoreObjectiveCType {
|
||||
- parameter success: the block to execute on success. The block passes a `BOOL` argument that indicates if there were any changes made.
|
||||
*/
|
||||
@objc
|
||||
public func handleSuccess(@noescape _ success: (hasChanges: Bool) -> Void) {
|
||||
public func handleSuccess(_ success: @noescape (hasChanges: Bool) -> Void) {
|
||||
|
||||
guard case .success(let hasChanges) = self.bridgeToSwift else {
|
||||
|
||||
@@ -127,7 +127,7 @@ public final class CSSaveResult: NSObject, CoreStoreObjectiveCType {
|
||||
- parameter failure: the block to execute on failure. The block passes an `NSError` argument that pertains to the actual error.
|
||||
*/
|
||||
@objc
|
||||
public func handleFailure(@noescape _ failure: (error: NSError) -> Void) {
|
||||
public func handleFailure(_ failure: @noescape (error: NSError) -> Void) {
|
||||
|
||||
guard case .failure(let error) = self.bridgeToSwift else {
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
|
||||
select:CSSelectString(CSAttribute(@"fullname"))
|
||||
fetchClauses:@[[CSWhere keyPath:@"employeeID" isEqualTo: @1111]]];
|
||||
```
|
||||
|
||||
- parameter keyPath: the attribute name
|
||||
*/
|
||||
@objc
|
||||
@@ -61,7 +60,6 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
|
||||
queryValueFrom:[CSFrom entityClass:[MyPersonEntity class]]
|
||||
select:[CSSelect numberForTerm:[CSSelectTerm average:@"age" as:nil]]];
|
||||
```
|
||||
|
||||
- parameter keyPath: the attribute name
|
||||
- parameter `as`: the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key "average(<attributeName>)" is used
|
||||
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the average value of an attribute
|
||||
@@ -79,7 +77,6 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
|
||||
queryValueFrom:[CSFrom entityClass:[MyPersonEntity class]]
|
||||
select:[CSSelect numberForTerm:[CSSelectTerm count:@"employeeID" as:nil]]];
|
||||
```
|
||||
|
||||
- parameter keyPath: the attribute name
|
||||
- parameter alias: the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key "count(<attributeName>)" is used
|
||||
- returns: a `SelectTerm` to a `Select` clause for a count query
|
||||
@@ -97,7 +94,6 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
|
||||
queryValueFrom:[CSFrom entityClass:[MyPersonEntity class]]
|
||||
select:[CSSelect numberForTerm:[CSSelectTerm maximum:@"age" as:nil]]];
|
||||
```
|
||||
|
||||
- parameter keyPath: the attribute name
|
||||
- parameter alias: the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key "max(<attributeName>)" is used
|
||||
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the maximum value for an attribute
|
||||
@@ -115,7 +111,6 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
|
||||
queryValueFrom:[CSFrom entityClass:[MyPersonEntity class]]
|
||||
select:[CSSelect numberForTerm:[CSSelectTerm minimum:@"age" as:nil]]];
|
||||
```
|
||||
|
||||
- parameter keyPath: the attribute name
|
||||
- parameter alias: the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key "min(<attributeName>)" is used
|
||||
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the minimum value for an attribute
|
||||
@@ -133,7 +128,6 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
|
||||
queryValueFrom:[CSFrom entityClass:[MyPersonEntity class]]
|
||||
select:[CSSelect numberForTerm:[CSSelectTerm sum:@"age" as:nil]]];
|
||||
```
|
||||
|
||||
- parameter keyPath: the attribute name
|
||||
- parameter alias: the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key "sum(<attributeName>)" is used
|
||||
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the sum value for an attribute
|
||||
@@ -152,7 +146,6 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
|
||||
select:[CSSelect objectIDForTerm:[CSSelectTerm objectIDAs:nil]]
|
||||
fetchClauses:@[[CSWhere keyPath:@"employeeID" isEqualTo: @1111]]];
|
||||
```
|
||||
|
||||
- parameter keyPath: the attribute name
|
||||
- parameter alias: the dictionary key to use to access the result. Ignored when the query return value is not an `NSDictionary`. If `nil`, the default key "objecID" is used
|
||||
- returns: a `SelectTerm` to a `Select` clause for querying the sum value for an attribute
|
||||
@@ -221,7 +214,6 @@ public final class CSSelect: NSObject {
|
||||
select:CSSelectNumber(CSAggregateMax(@"age"))
|
||||
// ...
|
||||
```
|
||||
|
||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||
*/
|
||||
public convenience init(numberTerm: CSSelectTerm) {
|
||||
@@ -237,7 +229,6 @@ public final class CSSelect: NSObject {
|
||||
select:CSSelectDecimal(CSAggregateAverage(@"price"))
|
||||
// ...
|
||||
```
|
||||
|
||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||
*/
|
||||
public convenience init(decimalTerm: CSSelectTerm) {
|
||||
@@ -253,7 +244,6 @@ public final class CSSelect: NSObject {
|
||||
select:CSSelectString(CSAttribute(@"fullname"))
|
||||
// ...
|
||||
```
|
||||
|
||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||
*/
|
||||
public convenience init(stringTerm: CSSelectTerm) {
|
||||
@@ -269,7 +259,6 @@ public final class CSSelect: NSObject {
|
||||
select:CSSelectDate(CSAggregateMax(@"updatedDate"))
|
||||
// ...
|
||||
```
|
||||
|
||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||
*/
|
||||
public convenience init(dateTerm: CSSelectTerm) {
|
||||
@@ -285,7 +274,6 @@ public final class CSSelect: NSObject {
|
||||
select:CSSelectData(CSAttribute(@"imageData"))
|
||||
// ...
|
||||
```
|
||||
|
||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||
*/
|
||||
public convenience init(dataTerm: CSSelectTerm) {
|
||||
@@ -301,7 +289,6 @@ public final class CSSelect: NSObject {
|
||||
select:CSSelectObjectID()
|
||||
// ...
|
||||
```
|
||||
|
||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||
*/
|
||||
public convenience init(objectIDTerm: ()) {
|
||||
@@ -316,7 +303,6 @@ public final class CSSelect: NSObject {
|
||||
queryValueFrom:[CSFrom entityClass:[MyPersonEntity class]]
|
||||
select:[CSSelect dictionaryForTerm:[CSSelectTerm maximum:@"age" as:nil]]];
|
||||
```
|
||||
|
||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||
- returns: a `CSSelect` clause for querying an entity attribute
|
||||
*/
|
||||
@@ -335,7 +321,6 @@ public final class CSSelect: NSObject {
|
||||
[CSSelectTerm attribute:@"age" as:nil]
|
||||
]]];
|
||||
```
|
||||
|
||||
- parameter terms: the `CSSelectTerm`s specifying the attribute/aggregate values to query
|
||||
- returns: a `CSSelect` clause for querying an entity attribute
|
||||
*/
|
||||
|
||||
@@ -76,7 +76,7 @@ public final class CSSetupResult: NSObject {
|
||||
- parameter failure: the block to execute on failure. The block passes an `NSError` argument that pertains to the actual error.
|
||||
*/
|
||||
@objc
|
||||
public func handleSuccess(@noescape _ success: (storage: CSStorageInterface) -> Void, @noescape failure: (error: NSError) -> Void) {
|
||||
public func handleSuccess(_ success: @noescape (storage: CSStorageInterface) -> Void, failure: @noescape (error: NSError) -> Void) {
|
||||
|
||||
if let storage = self.storage {
|
||||
|
||||
@@ -96,7 +96,7 @@ public final class CSSetupResult: NSObject {
|
||||
- parameter success: the block to execute on success. The block passes a `BOOL` argument that indicates if there were any changes made.
|
||||
*/
|
||||
@objc
|
||||
public func handleSuccess(@noescape _ success: (storage: CSStorageInterface) -> Void) {
|
||||
public func handleSuccess(_ success: @noescape (storage: CSStorageInterface) -> Void) {
|
||||
|
||||
guard let storage = self.storage else {
|
||||
|
||||
@@ -113,7 +113,7 @@ public final class CSSetupResult: NSObject {
|
||||
- parameter failure: the block to execute on failure. The block passes an `NSError` argument that pertains to the actual error.
|
||||
*/
|
||||
@objc
|
||||
public func handleFailure(@noescape _ failure: (error: NSError) -> Void) {
|
||||
public func handleFailure(_ failure: @noescape (error: NSError) -> Void) {
|
||||
|
||||
guard let error = self.error else {
|
||||
|
||||
|
||||
@@ -125,7 +125,6 @@ public final class CSUnsafeDataTransaction: CSBaseDataTransaction {
|
||||
- returns: a `CSUnsafeDataTransaction` instance where creates, updates, and deletes can be made.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func beginUnsafe() -> CSUnsafeDataTransaction {
|
||||
|
||||
return bridge {
|
||||
@@ -141,7 +140,6 @@ public final class CSUnsafeDataTransaction: CSBaseDataTransaction {
|
||||
- returns: a `CSUnsafeDataTransaction` instance where creates, updates, and deletes can be made.
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func beginUnsafeWithSupportsUndo(_ supportsUndo: Bool) -> CSUnsafeDataTransaction {
|
||||
|
||||
return bridge {
|
||||
|
||||
@@ -53,7 +53,6 @@ public final class CSWhere: NSObject, CSFetchClause, CSQueryClause, CSDeleteClau
|
||||
fetchAllFrom:CSFromClass([MyPersonEntity class])
|
||||
fetchClauses:@[CSWhereValue(YES)]]];
|
||||
```
|
||||
|
||||
- parameter value: the boolean value for the predicate
|
||||
*/
|
||||
@objc
|
||||
@@ -70,7 +69,6 @@ public final class CSWhere: NSObject, CSFetchClause, CSQueryClause, CSDeleteClau
|
||||
fetchAllFrom:CSFromClass([MyPersonEntity class])
|
||||
fetchClauses:@[CSWherePredicate(predicate)]];
|
||||
```
|
||||
|
||||
- parameter format: the format string for the predicate
|
||||
- parameter argumentArray: the arguments for `format`
|
||||
*/
|
||||
|
||||
@@ -38,7 +38,6 @@ public extension NSManagedObject {
|
||||
- returns: the primitive value for the KVC key
|
||||
*/
|
||||
@objc
|
||||
@warn_unused_result
|
||||
public func cs_accessValueForKVCKey(_ KVCKey: KeyPath) -> AnyObject? {
|
||||
|
||||
return self.accessValueForKVCKey(KVCKey)
|
||||
|
||||
Reference in New Issue
Block a user