Skip to content

Commit 2ac9e6c

Browse files
authored
Add custom mirrors to property wrappers (#146)
This way the values are more transparent to Custom Dump.
1 parent 1d34f53 commit 2ac9e6c

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Sources/SharingGRDBCore/Fetch.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ extension Fetch {
143143
}
144144
}
145145

146+
extension Fetch: CustomReflectable {
147+
public var customMirror: Mirror {
148+
Mirror(reflecting: wrappedValue)
149+
}
150+
}
151+
146152
extension Fetch: Equatable where Value: Equatable {
147153
public static func == (lhs: Self, rhs: Self) -> Bool {
148154
lhs.sharedReader == rhs.sharedReader

Sources/SharingGRDBCore/FetchAll.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,12 @@ extension FetchAll {
345345
}
346346
}
347347

348+
extension FetchAll: CustomReflectable {
349+
public var customMirror: Mirror {
350+
Mirror(reflecting: wrappedValue)
351+
}
352+
}
353+
348354
extension FetchAll: Equatable where Element: Equatable {
349355
public static func == (lhs: Self, rhs: Self) -> Bool {
350356
lhs.sharedReader == rhs.sharedReader

Sources/SharingGRDBCore/FetchOne.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,12 @@ extension FetchOne {
814814
}
815815
}
816816

817+
extension FetchOne: CustomReflectable {
818+
public var customMirror: Mirror {
819+
Mirror(reflecting: wrappedValue)
820+
}
821+
}
822+
817823
extension FetchOne: Equatable where Value: Equatable {
818824
public static func == (lhs: Self, rhs: Self) -> Bool {
819825
lhs.sharedReader == rhs.sharedReader

0 commit comments

Comments
 (0)