We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a135af1 commit d9b468aCopy full SHA for d9b468a
1 file changed
Tests/SharingGRDBTests/FetchOneTests.swift
@@ -169,12 +169,18 @@ import Testing
169
#expect($id.loadError == nil)
170
}
171
172
- @Test func fetchOneOptionalWithStructurdQueriesFind() async throws {
+ @Test func fetchOneOptional() async throws {
173
@FetchOne(Record.find(1)) var record: Record?
174
#expect(record != nil)
175
try await $record.load(Record.find(1))
176
177
178
+
179
+ @Test func fetchOneDelayedAssignment() async throws {
180
+ @FetchOne var record: Record
181
+ _record = FetchOne(wrappedValue: Record(id: 0), Record.all)
182
+ #expect(record.id == 1)
183
+ }
184
185
186
@Table
0 commit comments