File tree Expand file tree Collapse file tree 5 files changed +54
-34
lines changed Expand file tree Collapse file tree 5 files changed +54
-34
lines changed Original file line number Diff line number Diff line change
1
+ os :
2
+ - linux
3
+ - osx
4
+ language : generic
5
+ sudo : required
6
+ dist : trusty
7
+ osx_image : xcode7.3
8
+ install :
9
+ - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"
10
+ script :
11
+ # Build Fluent
12
+ - swift build
13
+ - swift build --configuration release
14
+ # Test Fluent
15
+ - swift test
Original file line number Diff line number Diff line change @@ -31,3 +31,26 @@ extension Filter.Comparison: CustomStringConvertible {
31
31
}
32
32
}
33
33
}
34
+
35
+ /// Temporarily not in SQL.swift file
36
+ extension Filter . Comparison {
37
+ /**
38
+ Translates a `Comparison` to SQL.
39
+ */
40
+ var sql : String {
41
+ switch self {
42
+ case . equals:
43
+ return " = "
44
+ case . greaterThan:
45
+ return " > "
46
+ case . lessThan:
47
+ return " < "
48
+ case . greaterThanOrEquals:
49
+ return " >= "
50
+ case . lessThanOrEquals:
51
+ return " <= "
52
+ case . notEquals:
53
+ return " != "
54
+ }
55
+ }
56
+ }
Original file line number Diff line number Diff line change @@ -164,19 +164,6 @@ extension Action {
164
164
}
165
165
}
166
166
167
- extension Filter . Scope {
168
- /**
169
- Translates a scope to SQL.
170
- */
171
- var sql : String {
172
- switch self {
173
- case . in:
174
- return " IN "
175
- case . notIn:
176
- return " NOT IN "
177
- }
178
- }
179
- }
180
167
181
168
/**
182
169
Allows optionals to be targeted
@@ -231,24 +218,3 @@ extension Limit {
231
218
}
232
219
}
233
220
234
- extension Filter . Comparison {
235
- /**
236
- Translates a `Comparison` to SQL.
237
- */
238
- var sql : String {
239
- switch self {
240
- case . equals:
241
- return " = "
242
- case . greaterThan:
243
- return " > "
244
- case . lessThan:
245
- return " < "
246
- case . greaterThanOrEquals:
247
- return " >= "
248
- case . lessThanOrEquals:
249
- return " <= "
250
- case . notEquals:
251
- return " != "
252
- }
253
- }
254
- }
Original file line number Diff line number Diff line change @@ -13,3 +13,18 @@ extension Filter.Scope: CustomStringConvertible {
13
13
return self == . in ? " in " : " not in "
14
14
}
15
15
}
16
+
17
+ /// Temporarily not in SQL.swift file
18
+ extension Filter . Scope {
19
+ /**
20
+ Translates a scope to SQL.
21
+ */
22
+ var sql : String {
23
+ switch self {
24
+ case . in:
25
+ return " IN "
26
+ case . notIn:
27
+ return " NOT IN "
28
+ }
29
+ }
30
+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import XCTest
5
5
6
6
XCTMain ( [
7
7
testCase ( ModelFindTests . allTests) ,
8
+ testCase ( QueryFiltersTests . allTests) ,
8
9
] )
9
10
10
11
#endif
You can’t perform that action at this time.
0 commit comments