Skip to content

Commit 99c9423

Browse files
committed
Conditional conformances for _CodableJSONRepresentation
1 parent f035565 commit 99c9423

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Sources/StructuredQueriesCore/QueryRepresentable/Codable+JSON.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import Foundation
22

3-
public struct _CodableJSONRepresentation<QueryOutput: Codable>: QueryRepresentable {
3+
public struct _CodableJSONRepresentation<QueryOutput: Codable>: Codable, QueryRepresentable {
44
public var queryOutput: QueryOutput
55

66
public init(queryOutput: QueryOutput) {
77
self.queryOutput = queryOutput
88
}
99
}
1010

11+
extension _CodableJSONRepresentation: Equatable where QueryOutput: Equatable {}
12+
extension _CodableJSONRepresentation: Hashable where QueryOutput: Hashable {}
13+
extension _CodableJSONRepresentation: Sendable where QueryOutput: Sendable {}
14+
1115
extension Decodable where Self: Encodable {
1216
/// A query expression representing codable JSON.
1317
///

Sources/StructuredQueriesSQLiteCore/JSONFunctions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension QueryExpression {
2626
}
2727
}
2828

29-
extension QueryExpression where QueryValue: Codable & QueryBindable {
29+
extension QueryExpression where QueryValue: Codable {
3030
/// A JSON array aggregate of this expression
3131
///
3232
/// Concatenates all of the values in a group.

0 commit comments

Comments
 (0)