Rename SQLString to SQLLiteral

This commit is contained in:
Gwendal Roué committed 2019-02-17 13:24:38 +01:00
1 parent 98e2d009c6
commit f018c7f823
34 files changed
+532 -575

No files matched your search

+6 -6
View File
@@ -26,21 +26,21 @@ public protocol SQLSelectable {
// MARK: - SQLSelectionLiteral
struct SQLSelectionLiteral : SQLSelectable {
private let sqlString: SQLString
private let sqlLiteral: SQLLiteral
init(_ sqlString: SQLString) {
self.sqlString = sqlString
init(_ sqlLiteral: SQLLiteral) {
self.sqlLiteral = sqlLiteral
}
func resultColumnSQL(_ context: inout SQLGenerationContext) -> String {
if !sqlString.arguments.isEmpty {
if context.appendArguments(sqlString.arguments) == false {
if !sqlLiteral.arguments.isEmpty {
if context.appendArguments(sqlLiteral.arguments) == false {
// GRDB limitation: we don't know how to look for `?` in sql and
// replace them with with literals.
fatalError("Not implemented")
}
}
return sqlString.sql
return sqlLiteral.sql
}
func countedSQL(_ context: inout SQLGenerationContext) -> String {