From 99c9423c38d1cb45d2445531dfa5a498dc388ef8 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 27 Nov 2025 18:07:19 -0600 Subject: [PATCH] Conditional conformances for _CodableJSONRepresentation --- .../QueryRepresentable/Codable+JSON.swift | 6 +++++- Sources/StructuredQueriesSQLiteCore/JSONFunctions.swift | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/StructuredQueriesCore/QueryRepresentable/Codable+JSON.swift b/Sources/StructuredQueriesCore/QueryRepresentable/Codable+JSON.swift index 84c572c7..b5d3324f 100644 --- a/Sources/StructuredQueriesCore/QueryRepresentable/Codable+JSON.swift +++ b/Sources/StructuredQueriesCore/QueryRepresentable/Codable+JSON.swift @@ -1,6 +1,6 @@ import Foundation -public struct _CodableJSONRepresentation: QueryRepresentable { +public struct _CodableJSONRepresentation: Codable, QueryRepresentable { public var queryOutput: QueryOutput public init(queryOutput: QueryOutput) { @@ -8,6 +8,10 @@ public struct _CodableJSONRepresentation: QueryRepresentab } } +extension _CodableJSONRepresentation: Equatable where QueryOutput: Equatable {} +extension _CodableJSONRepresentation: Hashable where QueryOutput: Hashable {} +extension _CodableJSONRepresentation: Sendable where QueryOutput: Sendable {} + extension Decodable where Self: Encodable { /// A query expression representing codable JSON. /// diff --git a/Sources/StructuredQueriesSQLiteCore/JSONFunctions.swift b/Sources/StructuredQueriesSQLiteCore/JSONFunctions.swift index d842250b..d0d80075 100644 --- a/Sources/StructuredQueriesSQLiteCore/JSONFunctions.swift +++ b/Sources/StructuredQueriesSQLiteCore/JSONFunctions.swift @@ -26,7 +26,7 @@ extension QueryExpression { } } -extension QueryExpression where QueryValue: Codable & QueryBindable { +extension QueryExpression where QueryValue: Codable { /// A JSON array aggregate of this expression /// /// Concatenates all of the values in a group.