mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
Rename SQLString to SQLLiteral
This commit is contained in:
1 parent
98e2d009c6
commit
f018c7f823
34 files changed
+532
-575
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user