implementations for desctiption and debugDescription complete for all CoreStore types

This commit is contained in:
John Rommel Estropia
2016-05-08 20:30:28 +09:00
parent 9dae291f62
commit 57b66cff34
25 changed files with 373 additions and 35 deletions

View File

@@ -70,6 +70,14 @@ public final class CSAsynchronousDataTransaction: CSBaseDataTransaction {
}
// MARK: NSObject
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: BaseDataTransaction
/**

View File

@@ -253,6 +253,11 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
return self.bridgeToSwift === object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -62,6 +62,11 @@ public final class CSError: NSError, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -111,6 +111,14 @@ public final class CSFrom: NSObject, CoreStoreObjectiveCType {
}
// MARK: NSObject
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType
public let bridgeToSwift: From<NSManagedObject>

View File

@@ -66,6 +66,11 @@ public final class CSGroupBy: NSObject, CSQueryClause, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CSQueryClause

View File

@@ -101,6 +101,11 @@ public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreObjec
return self.bridgeToSwift === object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -85,6 +85,11 @@ public final class CSInto: NSObject, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -537,6 +537,11 @@ public final class CSListMonitor: NSObject, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -153,6 +153,11 @@ public final class CSMigrationResult: NSObject, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -99,6 +99,11 @@ public final class CSMigrationType: NSObject, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -115,6 +115,11 @@ public final class CSObjectMonitor: NSObject, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -104,6 +104,11 @@ public final class CSOrderBy: NSObject, CSFetchClause, CSQueryClause, CSDeleteCl
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CSFetchClause, CSQueryClause, CSDeleteClause

View File

@@ -179,6 +179,11 @@ public final class CSSQLiteStore: NSObject, CSLocalStorage, CoreStoreObjectiveCT
return self.bridgeToSwift === object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -153,6 +153,11 @@ public final class CSSaveResult: NSObject, CoreStoreObjectiveCType {
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType

View File

@@ -64,6 +64,14 @@ public final class CSSectionBy: NSObject, CoreStoreObjectiveCType {
}
// MARK: NSObject
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType
public let bridgeToSwift: SectionBy

View File

@@ -364,6 +364,11 @@ public final class CSSelect: NSObject {
&& self.selectTerms == object.selectTerms
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType
@@ -371,6 +376,7 @@ public final class CSSelect: NSObject {
self.attributeType = T.attributeType
self.selectTerms = swiftValue.selectTerms
self.bridgeToSwift = swiftValue
super.init()
}
@@ -378,6 +384,7 @@ public final class CSSelect: NSObject {
self.attributeType = .UndefinedAttributeType
self.selectTerms = swiftValue.selectTerms
self.bridgeToSwift = swiftValue
super.init()
}
@@ -386,6 +393,11 @@ public final class CSSelect: NSObject {
internal let attributeType: NSAttributeType
internal let selectTerms: [SelectTerm]
// MARK: Private
private let bridgeToSwift: CoreStoreDebugStringConvertible
}

View File

@@ -56,7 +56,7 @@ public final class CSSetupResult: NSObject {
}
/**
A `CSStorageInterface` instance if the `commit` operation for the transaction succeeded. Returns `NO` otherwise.
A `CSStorageInterface` instance if the `commit` operation for the transaction succeeded. Returns `nil` otherwise.
*/
@objc
public let storage: CSStorageInterface?
@@ -143,6 +143,11 @@ public final class CSSetupResult: NSObject {
return self.storage === object.storage
&& self.error == object.error
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType
@@ -159,8 +164,14 @@ public final class CSSetupResult: NSObject {
self.storage = nil
self.error = error.bridgeToObjectiveC
}
self.bridgeToSwift = swiftValue
super.init()
}
// MARK: Private
private let bridgeToSwift: CoreStoreDebugStringConvertible
}

View File

@@ -70,6 +70,14 @@ public final class CSSynchronousDataTransaction: CSBaseDataTransaction {
}
// MARK: NSObject
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: BaseDataTransaction
/**

View File

@@ -50,6 +50,14 @@ public final class CSTweak: NSObject, CSFetchClause, CSQueryClause, CSDeleteClau
}
// MARK: NSObject
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CSFetchClause, CSQueryClause, CSDeleteClause
@objc

View File

@@ -138,6 +138,14 @@ public final class CSUnsafeDataTransaction: CSBaseDataTransaction {
}
// MARK: NSObject
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CoreStoreObjectiveCType
internal typealias SwiftType = UnsafeDataTransaction

View File

@@ -117,6 +117,11 @@ public final class CSWhere: NSObject, CSFetchClause, CSQueryClause, CSDeleteClau
return self.bridgeToSwift == object.bridgeToSwift
}
public override var description: String {
return "(\(String(reflecting: self.dynamicType))) \(self.bridgeToSwift.coreStoreDumpString)"
}
// MARK: CSFetchClause, CSQueryClause, CSDeleteClause