Skip to content

Commit d13781d

Browse files
committed
rearrange
1 parent 834a114 commit d13781d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

templates/swift/Sources/Query.swift.twig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ public class Query {
2828
buildQueryWhere(attribute, is: "search", to: value)
2929
}
3030

31-
public static func buildQueryWhere(_ attribute: String, is method: String, to value: Any) -> String {
32-
switch value {
33-
case let value as Array<Any>:
34-
return "\(method)(\"\(attribute)\", [\(value.map { parseValues($0) }.joined(separator: ",") )])"
35-
default:
36-
return "\(method)(\"\(attribute)\", [\(parseValues(value))])"
37-
}
38-
}
39-
4031
public static func orderAsc(_ attribute: String) -> String {
4132
"orderAsc(\"\(attribute)\")"
4233
}
@@ -61,6 +52,15 @@ public class Query {
6152
"offset(\(offset))"
6253
}
6354

55+
public static func buildQueryWhere(_ attribute: String, is method: String, to value: Any) -> String {
56+
switch value {
57+
case let value as Array<Any>:
58+
return "\(method)(\"\(attribute)\", [\(value.map { parseValues($0) }.joined(separator: ",") )])"
59+
default:
60+
return "\(method)(\"\(attribute)\", [\(parseValues(value))])"
61+
}
62+
}
63+
6464
private static func parseValues(_ value: Any) -> String {
6565
switch value {
6666
case let value as String:

0 commit comments

Comments
 (0)