Skip to content

Commit 1025942

Browse files
committed
Removed implicit iteration.
This was causing a conflict with SequenceType.
1 parent 0f3c477 commit 1025942

File tree

6 files changed

+3
-37
lines changed

6 files changed

+3
-37
lines changed

CoreDataQueryInterface.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'CoreDataQueryInterface'
3-
s.version = '2.0.2'
3+
s.version = '2.0.3'
44
s.license = 'MIT'
55
s.summary = 'A type-safe, fluent Swift library for working with Core Data.'
66
s.homepage = 'https://github.com/Prosumma/CoreDataQueryInterface'

CoreDataQueryInterface.xcodeproj/project.pbxproj

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
F3251A111B2BDE6E0031B817 /* Department.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3251A0E1B2BDE6E0031B817 /* Department.swift */; };
2525
F3251A121B2BDE6E0031B817 /* Employee.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3251A0F1B2BDE6E0031B817 /* Employee.swift */; };
2626
F3251A131B2BDE6E0031B817 /* Employee.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3251A0F1B2BDE6E0031B817 /* Employee.swift */; };
27-
F335675E1B2D18A0007853DB /* Iterating.swift in Sources */ = {isa = PBXBuildFile; fileRef = F335675D1B2D18A0007853DB /* Iterating.swift */; };
28-
F335675F1B2D18A0007853DB /* Iterating.swift in Sources */ = {isa = PBXBuildFile; fileRef = F335675D1B2D18A0007853DB /* Iterating.swift */; };
29-
F33567601B2D18A0007853DB /* Iterating.swift in Sources */ = {isa = PBXBuildFile; fileRef = F335675D1B2D18A0007853DB /* Iterating.swift */; };
30-
F33567611B2D18A0007853DB /* Iterating.swift in Sources */ = {isa = PBXBuildFile; fileRef = F335675D1B2D18A0007853DB /* Iterating.swift */; };
3127
F33567661B2D2EF7007853DB /* SelectionAndGroupingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F33567641B2D2EF7007853DB /* SelectionAndGroupingTests.swift */; };
3228
F33567681B2D2EF7007853DB /* SelectionAndGroupingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F33567641B2D2EF7007853DB /* SelectionAndGroupingTests.swift */; };
3329
F34E74941B2E38C900FAA04A /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = F34E74931B2E38C900FAA04A /* Expression.swift */; };
@@ -163,7 +159,6 @@
163159
F3251A0B1B2BDA2D0031B817 /* Company.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Company.xcdatamodel; sourceTree = "<group>"; };
164160
F3251A0E1B2BDE6E0031B817 /* Department.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Department.swift; sourceTree = "<group>"; };
165161
F3251A0F1B2BDE6E0031B817 /* Employee.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Employee.swift; sourceTree = "<group>"; };
166-
F335675D1B2D18A0007853DB /* Iterating.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Iterating.swift; sourceTree = "<group>"; };
167162
F33567641B2D2EF7007853DB /* SelectionAndGroupingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectionAndGroupingTests.swift; sourceTree = "<group>"; };
168163
F34E74931B2E38C900FAA04A /* Expression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Expression.swift; sourceTree = "<group>"; };
169164
F34E74981B2E3A9900FAA04A /* Alias.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Alias.swift; sourceTree = "<group>"; };
@@ -277,7 +272,6 @@
277272
F371ABD01B2BC122002A8A85 /* Filtering.swift */,
278273
F3B0E3391B2DFD70008D7EEF /* Function.swift */,
279274
F34E749D1B2E576000FAA04A /* Grouping.swift */,
280-
F335675D1B2D18A0007853DB /* Iterating.swift */,
281275
F371ABEA1B2BC4CB002A8A85 /* ManagedObjectContextType.swift */,
282276
F371ABE41B2BC2E7002A8A85 /* ManagedObjectIDQuery.swift */,
283277
F3754CCA1B35FBE5004B46B3 /* Operators.swift */,
@@ -514,7 +508,6 @@
514508
buildActionMask = 2147483647;
515509
files = (
516510
F371ABCE1B2BBB15002A8A85 /* ExpressionQueryType.swift in Sources */,
517-
F33567601B2D18A0007853DB /* Iterating.swift in Sources */,
518511
F371ABBA1B2BA8BA002A8A85 /* QueryBuilder.swift in Sources */,
519512
F371ABE21B2BC1F7002A8A85 /* Selecting.swift in Sources */,
520513
F3B0E3411B2E0351008D7EEF /* ExpressionType.swift in Sources */,
@@ -552,7 +545,6 @@
552545
F371ABC01B2BA9DA002A8A85 /* EntityQuery.swift in Sources */,
553546
F3B0E33D1B2DFD70008D7EEF /* Function.swift in Sources */,
554547
F367DE331B2D6149009C1020 /* OrderType.swift in Sources */,
555-
F33567611B2D18A0007853DB /* Iterating.swift in Sources */,
556548
F371ABB51B2BA5FA002A8A85 /* AttributeType.swift in Sources */,
557549
F371ABE81B2BC2E7002A8A85 /* ManagedObjectIDQuery.swift in Sources */,
558550
F371ABDE1B2BC15C002A8A85 /* Executing.swift in Sources */,
@@ -588,7 +580,6 @@
588580
buildActionMask = 2147483647;
589581
files = (
590582
F371ABCC1B2BBB15002A8A85 /* ExpressionQueryType.swift in Sources */,
591-
F335675E1B2D18A0007853DB /* Iterating.swift in Sources */,
592583
F371ABB81B2BA8BA002A8A85 /* QueryBuilder.swift in Sources */,
593584
F371ABE01B2BC1F7002A8A85 /* Selecting.swift in Sources */,
594585
F3B0E33F1B2E0351008D7EEF /* ExpressionType.swift in Sources */,
@@ -626,7 +617,6 @@
626617
F371ABBE1B2BA9DA002A8A85 /* EntityQuery.swift in Sources */,
627618
F3B0E33B1B2DFD70008D7EEF /* Function.swift in Sources */,
628619
F367DE311B2D6149009C1020 /* OrderType.swift in Sources */,
629-
F335675F1B2D18A0007853DB /* Iterating.swift in Sources */,
630620
F371ABB31B2BA5FA002A8A85 /* AttributeType.swift in Sources */,
631621
F371ABE61B2BC2E7002A8A85 /* ManagedObjectIDQuery.swift in Sources */,
632622
F371ABDC1B2BC15C002A8A85 /* Executing.swift in Sources */,

CoreDataQueryInterface/Iterating.swift

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

CoreDataQueryInterface/QueryType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import CoreData
1010
import Foundation
1111

12-
public protocol QueryType: SequenceType {
12+
public protocol QueryType {
1313
typealias QueryEntityType: EntityType
1414
typealias QueryResultType: AnyObject
1515

CoreDataQueryInterfaceTests/SanityTests.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,5 @@ class SanityTests: BaseTestCase {
2020
let employeeCount = try! managedObjectContext.from(Employee).count()
2121
XCTAssertEqual(employeeCount, 25)
2222
}
23-
24-
func testIteration() {
25-
var iterations = 0
26-
for _ in managedObjectContext.from(Department) {
27-
iterations++
28-
}
29-
XCTAssertEqual(iterations, 3)
30-
}
3123

3224
}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ Core Data Query Interface (CDQI) is a type-safe, fluent, intuitive library for w
1111
The best way to understand the advantages of CDQI is to see an example. (Be sure to scroll right to see the entire example).
1212

1313
```swift
14-
// Iteration causes the query to execute, though there are other ways
15-
for employee in managedObjectContext.from(Employee).filter({$0.salary > 70000 && $0.department.name == "Engineering"}).order(descending: {$0.lastName}, {$0.firstName}) {
14+
for employee in try! managedObjectContext.from(Employee).filter({$0.salary > 70000 && $0.department.name == "Engineering"}).order(descending: {$0.lastName}, {$0.firstName}).all() {
1615
debugPrintln("\(employee.lastName), \(employee.firstName)")
1716
}
1817
```

0 commit comments

Comments
 (0)