From 473b06eac5716dbb4f452588695747342bf715fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 15 Sep 2024 11:32:06 +0200 Subject: [PATCH] Fix compiler warnings about SQLQualifiedRelation --- GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift b/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift index 17551514b..5b37ead62 100644 --- a/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift +++ b/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift @@ -513,6 +513,9 @@ struct SQLQueryGenerator: Refinable { } } +// This type is marked as `Sendable` in order to avoid compiler warnings, +// but it should not need to be: instances are synchronously created, used, +// and discarded. /// To generate SQL, we need a "qualified" relation, where all tables, /// expressions, etc, are qualified with table aliases. /// @@ -546,8 +549,7 @@ struct SQLQueryGenerator: Refinable { /// HAVING ... -- havingExpressionPromise /// ORDER BY ... -- ordering /// LIMIT ... -- limit - -private struct SQLQualifiedRelation { +private struct SQLQualifiedRelation: Sendable { /// All aliases, including aliases of joined relations var allAliases: [TableAlias] { joins.reduce(into: [source.alias].compactMap { $0 }) {