mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Mark methods that are slow to compile (thanks to https://medium.com/swift-programming/speeding-up-slow-swift-build-times-922feeba5780)
This commit is contained in:
1 parent
a8f93a5a9c
commit
9f4b03c14f
2 files changed
+7
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user