mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
Merge branch 'master' of github.com:groue/GRDB.swift into Swift3
Conflicts: GRDB/Core/DatabaseValueConvertible.swift
This commit is contained in:
commit
7ea2d7d1ab
1 file changed
+1
-3
@@ -381,9 +381,7 @@ extension DatabaseValueConvertible {
|
||||
var sqlLiteral: String {
|
||||
// Slow but reliable implementation.
|
||||
return escapingConnection.inDatabase { db in
|
||||
let escapingStatement = try! db.makeSelectStatement("SELECT ?")
|
||||
escapingStatement.unsafeSetArguments([self])
|
||||
_ = escapingStatement.fetchSequence { _ in }.makeIterator().next()
|
||||
_ = Row.fetch(db, "SELECT ?", arguments: [self]).makeIterator().next()
|
||||
let index = lastEscapingSQL.index(lastEscapingSQL.startIndex, offsetBy: 7)
|
||||
assert(lastEscapingSQL.substring(to: index) == "SELECT ")
|
||||
return lastEscapingSQL.substring(from: index)
|
||||
|
||||
Reference in new issue
Block a user