This commit is contained in:
Gwendal Roué committed 2016-04-28 06:36:23 +02:00
1 parent a8f93a5a9c
commit 9f4b03c14f
2 files changed
+7

No files matched your search

+3
View File
@@ -437,6 +437,9 @@ public indirect enum _SQLExpression {
///
func sql(db: Database, inout _ bindings: [DatabaseValueConvertible?]) throws -> String {
// TODO: this method is slow to compile
// https://medium.com/swift-programming/speeding-up-slow-swift-build-times-922feeba5780#.s77wmh4h0
// 10746.4ms /Users/groue/Documents/git/groue/GRDB.swift/GRDB/FetchRequest/SQLSelectQuery.swift:439:10 func sql(db: Database, inout _ bindings: [DatabaseValueConvertible?]) throws -> String
switch self {
case .Literal(let sql):
return sql
+4
View File
@@ -161,6 +161,10 @@ extension RowConvertible where Self: TableMapping {
// Returns nil if keys is empty.
@warn_unused_result
private static func fetchByKeyStatement(db: Database, keys: [[String: DatabaseValueConvertible?]]) -> SelectStatement? {
// TODO: this method is slow to compile
// https://medium.com/swift-programming/speeding-up-slow-swift-build-times-922feeba5780#.s77wmh4h0
// 586.8ms /Users/groue/Documents/git/groue/GRDB.swift/GRDB/Record/TableMapping.swift:163:25 @warn_unused_result private static func fetchByKeyStatement(db: Database, keys: [[String : DatabaseValueConvertible?]]) -> SelectStatement?
// Avoid performing useless SELECT
guard keys.count > 0 else {
return nil