Skip to content

Commit 4313359

Browse files
committed
hasAttribute(retroactive)
1 parent eee2e3d commit 4313359

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Sources/JobsPostgres/AnyDecodableJob+postgres.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import Jobs
1616
import PostgresNIO
1717

18-
extension AnyDecodableJob: @retroactive PostgresDecodable {
18+
extension AnyDecodableJob {
1919
public static var psqlType: PostgresDataType {
2020
.bytea
2121
}
@@ -37,3 +37,9 @@ extension AnyDecodableJob: @retroactive PostgresDecodable {
3737
}
3838
}
3939
}
40+
41+
#if hasAttribute(retroactive)
42+
extension AnyDecodableJob: @retroactive PostgresDecodable {}
43+
#else
44+
extension AnyDecodableJob: PostgresDecodable {}
45+
#endif

Sources/JobsPostgres/JobRequest+postgres.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import Jobs
1616
import PostgresNIO
1717

18-
extension JobRequest: @retroactive PostgresEncodable where Parameters: Encodable {
18+
extension JobRequest {
1919
public static var psqlType: PostgresDataType {
2020
.bytea
2121
}
@@ -31,3 +31,9 @@ extension JobRequest: @retroactive PostgresEncodable where Parameters: Encodable
3131
try context.jsonEncoder.encode(self, into: &byteBuffer)
3232
}
3333
}
34+
35+
#if hasAttribute(retroactive)
36+
extension JobRequest: @retroactive PostgresEncodable where Parameters: Encodable {}
37+
#else
38+
extension JobRequest: PostgresEncodable where Parameters: Encodable {}
39+
#endif

0 commit comments

Comments
 (0)