This commit is contained in:
Gwendal Roué committed 2020-04-30 09:04:17 +02:00
1 parent 1e92b98165
commit cb7a7633b1
2 files changed
+3 -1

No files matched your search

@@ -79,6 +79,7 @@ struct SQLQueryGenerator: Refinable {
let selection = try relation.selectionPromise.resolve(context.db)
GRDBPrecondition(!selection.isEmpty, "Can't generate SQL with an empty selection")
if requiresSingleColumn {
#warning("TODO: is requiresSingleColumn necessary? See what SQLite does when several columns are provided")
GRDBPrecondition(selection.count == 1, "A single column must be selected.")
let columnCount = try selection[0].columnCount(context.db)
GRDBPrecondition(columnCount == 1, "A single column must be selected.")