File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ public struct SwiftGenerator: Language {
160160 return " () "
161161 }
162162
163- return generatedInputType? . name ?? swiftType ( for: firstParam. type)
163+ return generatedInputType. map { " DB. \( $0 . name) " } ?? swiftType ( for: firstParam. type)
164164 }
165165
166166 private static func outputType(
@@ -177,7 +177,7 @@ public struct SwiftGenerator: Language {
177177 return table. capitalizedFirst
178178 }
179179
180- let type = generatedOutputType? . name ?? swiftType ( for: firstColumn. root)
180+ let type = generatedOutputType. map { " DB. \( $0 . name) " } ?? swiftType ( for: firstColumn. root)
181181
182182 return switch statement. outputCardinality {
183183 case . single: type
Original file line number Diff line number Diff line change @@ -18,4 +18,8 @@ public extension Query where Input == () {
1818 func execute( ) async throws -> Output {
1919 return try await execute ( with: ( ) )
2020 }
21+
22+ func observe( ) -> any QueryObservation < Output > {
23+ return observe ( with: ( ) )
24+ }
2125}
Original file line number Diff line number Diff line change @@ -49,4 +49,8 @@ public extension DatabaseQuery where Input == () {
4949 func execute( tx: borrowing Transaction ) throws -> Output {
5050 return try execute ( with: ( ) , tx: tx)
5151 }
52+
53+ func observe( in database: any Database ) -> any QueryObservation < Output > {
54+ return observe ( with: ( ) , in: database)
55+ }
5256}
You can’t perform that action at this time.
0 commit comments