Skip to content

Commit a5ad892

Browse files
committed
Got rid of KeyAttribute.
With the advent of TypedExpressionConvertible, this type is now superfluous.
1 parent f09e1a0 commit a5ad892

File tree

8 files changed

+8
-43
lines changed

8 files changed

+8
-43
lines changed

CoreDataQueryInterface.xcodeproj/project.pbxproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
F33863951C322AFE00818352 /* CustomExpressionConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = F33863921C322AFE00818352 /* CustomExpressionConvertible.swift */; };
5252
F33863981C322BDB00818352 /* Aggregable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F33863971C322BDB00818352 /* Aggregable.swift */; };
5353
F338639A1C322BDB00818352 /* Aggregable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F33863971C322BDB00818352 /* Aggregable.swift */; };
54-
F338639D1C322C0B00818352 /* KeyAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = F338639C1C322C0B00818352 /* KeyAttribute.swift */; };
55-
F338639F1C322C0B00818352 /* KeyAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = F338639C1C322C0B00818352 /* KeyAttribute.swift */; };
5654
F33863A21C322DB700818352 /* CustomPropertyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = F33863A11C322DB700818352 /* CustomPropertyConvertible.swift */; };
5755
F33863A41C322DB700818352 /* CustomPropertyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = F33863A11C322DB700818352 /* CustomPropertyConvertible.swift */; };
5856
F34E749E1B2E576000FAA04A /* Grouping.swift in Sources */ = {isa = PBXBuildFile; fileRef = F34E749D1B2E576000FAA04A /* Grouping.swift */; };
@@ -160,7 +158,6 @@
160158
F335F5D21CB2CE370044A826 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
161159
F33863921C322AFE00818352 /* CustomExpressionConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomExpressionConvertible.swift; sourceTree = "<group>"; };
162160
F33863971C322BDB00818352 /* Aggregable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Aggregable.swift; sourceTree = "<group>"; };
163-
F338639C1C322C0B00818352 /* KeyAttribute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyAttribute.swift; sourceTree = "<group>"; };
164161
F33863A11C322DB700818352 /* CustomPropertyConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomPropertyConvertible.swift; sourceTree = "<group>"; };
165162
F34E749D1B2E576000FAA04A /* Grouping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Grouping.swift; sourceTree = "<group>"; };
166163
F356831B1B43AC040089F0A0 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
@@ -285,7 +282,6 @@
285282
F371ABCB1B2BBB15002A8A85 /* ExpressionQueryType.swift */,
286283
F371ABD01B2BC122002A8A85 /* Filtering.swift */,
287284
F34E749D1B2E576000FAA04A /* Grouping.swift */,
288-
F338639C1C322C0B00818352 /* KeyAttribute.swift */,
289285
F335F5D21CB2CE370044A826 /* Logger.swift */,
290286
F371ABEA1B2BC4CB002A8A85 /* ManagedObjectContextType.swift */,
291287
F371ABE41B2BC2E7002A8A85 /* ManagedObjectIDQuery.swift */,
@@ -553,7 +549,6 @@
553549
F35DD36A1CAF8BC400FB2EF8 /* PredicateBuilder.swift in Sources */,
554550
F371ABD31B2BC122002A8A85 /* Filtering.swift in Sources */,
555551
F379BB031C3470FA001BC25B /* Count.swift in Sources */,
556-
F338639F1C322C0B00818352 /* KeyAttribute.swift in Sources */,
557552
F371ABED1B2BC4CB002A8A85 /* ManagedObjectContextType.swift in Sources */,
558553
F35DD37E1CB01D1600FB2EF8 /* BooleanAttribute.swift in Sources */,
559554
F371ABC91B2BB80E002A8A85 /* QueryType.swift in Sources */,
@@ -618,7 +613,6 @@
618613
F35DD3681CAF8BC400FB2EF8 /* PredicateBuilder.swift in Sources */,
619614
F371ABD11B2BC122002A8A85 /* Filtering.swift in Sources */,
620615
F379BB011C3470FA001BC25B /* Count.swift in Sources */,
621-
F338639D1C322C0B00818352 /* KeyAttribute.swift in Sources */,
622616
F371ABEB1B2BC4CB002A8A85 /* ManagedObjectContextType.swift in Sources */,
623617
F35DD37C1CB01D1600FB2EF8 /* BooleanAttribute.swift in Sources */,
624618
F371ABC71B2BB80E002A8A85 /* QueryType.swift in Sources */,

CoreDataQueryInterface/Aggregable.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ SOFTWARE.
2424

2525
import Foundation
2626

27+
/**
28+
Implemented by `Attribute` subclasses to participate in subqueries and KVC aggregation expressions.
29+
*/
2730
public protocol Aggregable: Countable {
2831
associatedtype AggregateType: Attribute = Self
2932
func subquery(variable: String, predicate: AggregateType -> NSPredicate) -> Countable

CoreDataQueryInterface/BooleanAttribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extension Bool: TypedExpressionConvertible {
3232
}
3333
}
3434

35-
public class BooleanAttribute: KeyAttribute, TypedExpressionConvertible {
35+
public class BooleanAttribute: Attribute, TypedExpressionConvertible {
3636
public typealias ExpressionValueType = Bool
3737
public required init(_ name: String, parent: Attribute? = nil, type: NSAttributeType? = nil) {
3838
super.init(name, parent: parent, type: .BooleanAttributeType)

CoreDataQueryInterface/DataAttribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extension NSData: TypedExpressionConvertible {
3232
}
3333
}
3434

35-
public class DataAttribute: KeyAttribute, TypedExpressionConvertible {
35+
public class DataAttribute: Attribute, TypedExpressionConvertible {
3636
public typealias ExpressionValueType = NSData
3737
public required init(_ name: String, parent: Attribute? = nil, type: NSAttributeType? = nil) {
3838
super.init(name, parent: parent, type: .BinaryDataAttributeType)

CoreDataQueryInterface/DateAttribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SOFTWARE.
2525
import CoreData
2626
import Foundation
2727

28-
public class DateAttribute: KeyAttribute, TypedExpressionConvertible {
28+
public class DateAttribute: Attribute, TypedExpressionConvertible {
2929
public typealias ExpressionValueType = NSDate
3030
public required init(_ name: String, parent: Attribute? = nil, type: NSAttributeType? = nil) {
3131
super.init(name, parent: parent, type: .DateAttributeType)

CoreDataQueryInterface/KeyAttribute.swift

Lines changed: 0 additions & 32 deletions
This file was deleted.

CoreDataQueryInterface/NumericAttribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424

2525
import Foundation
2626

27-
public class NumericAttribute: KeyAttribute, TypedExpressionConvertible {
27+
public class NumericAttribute: Attribute, TypedExpressionConvertible {
2828
public typealias ExpressionValueType = NSNumber
2929
}
3030

CoreDataQueryInterface/StringAttribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SOFTWARE.
2525
import CoreData
2626
import Foundation
2727

28-
public class StringAttribute: KeyAttribute, TypedExpressionConvertible {
28+
public class StringAttribute: Attribute, TypedExpressionConvertible {
2929
public typealias ExpressionValueType = String
3030
public required init(_ name: String, parent: Attribute? = nil, type: NSAttributeType? = nil) {
3131
super.init(name, parent: parent, type: .StringAttributeType)

0 commit comments

Comments
 (0)