From 9710bc1fd4e65d3a44e4ca0d76c536918b212c5f Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Tue, 10 Jun 2025 12:29:23 -0700 Subject: [PATCH] Swift 6.2: Fix Sendable Metatype Warnings --- Sources/StructuredQueriesCore/Table.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/StructuredQueriesCore/Table.swift b/Sources/StructuredQueriesCore/Table.swift index 5cb66ba4..380de414 100644 --- a/Sources/StructuredQueriesCore/Table.swift +++ b/Sources/StructuredQueriesCore/Table.swift @@ -1,9 +1,15 @@ +#if swift(>=6.2) + public typealias _SendableMetatype = SendableMetatype +#else + public protocol _SendableMetatype {} +#endif + /// A type representing a database table. /// /// Don't conform to this protocol directly. Instead, use the `@Table` and `@Column` macros to /// generate a conformance. @dynamicMemberLookup -public protocol Table: QueryRepresentable where TableColumns.QueryValue == Self { +public protocol Table: QueryRepresentable, _SendableMetatype where TableColumns.QueryValue == Self { /// A type that describes this table's columns. associatedtype TableColumns: TableDefinition