We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e9843 commit e757ef1Copy full SHA for e757ef1
Sources/PostgresNIO/Data/PostgresData+RawRepresentable.swift
@@ -0,0 +1,16 @@
1
+extension RawRepresentable where Self.RawValue: PostgresDataConvertible {
2
+ static var postgresDataType: PostgresDataType {
3
+ RawValue.postgresDataType
4
+ }
5
+
6
+ init?(postgresData: PostgresData) {
7
+ guard let rawValue = RawValue.init(postgresData: postgresData) else {
8
+ return nil
9
10
+ self.init(rawValue: rawValue)
11
12
13
+ var postgresData: PostgresData? {
14
+ self.rawValue.postgresData
15
16
+}
0 commit comments