Skip to content

Commit 31bcb1e

Browse files
committed
wip
1 parent 781ba95 commit 31bcb1e

7 files changed

Lines changed: 64 additions & 55 deletions

File tree

Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/Reminders/Schema.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,14 @@ nonisolated private let logger = Logger(subsystem: "Reminders", category: "Datab
387387
func seedSampleData() throws {
388388
@Dependency(\.date.now) var now
389389
@Dependency(\.uuid) var uuid
390-
let remindersListIDs = (0...2).map { _ in uuid() }
391-
let reminderIDs = (0...10).map { _ in uuid() }
390+
var remindersListIDs: [UUID] = []
391+
for _ in 0...2 {
392+
remindersListIDs.append(uuid())
393+
}
394+
var reminderIDs: [UUID] = []
395+
for _ in 0...10 {
396+
reminderIDs.append(uuid())
397+
}
392398
try seed {
393399
RemindersList(
394400
id: remindersListIDs[0],

Examples/Reminders/SearchReminders.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ class SearchRemindersModel {
107107
),
108108
animation: .default
109109
)
110-
.task
111110
}
112111
}
113112
}

Sources/SQLiteData/Fetch.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public struct Fetch<Value: Sendable>: Sendable {
102102
public func load(
103103
_ request: some FetchKeyRequest<Value>,
104104
database: (any DatabaseReader)? = nil
105-
) async throws -> FetchSubscription<Value> {
105+
) async throws -> FetchSubscription {
106106
try await sharedReader.load(.fetch(request, database: database))
107107
return FetchSubscription(sharedReader: sharedReader)
108108
}
@@ -143,7 +143,7 @@ extension Fetch {
143143
_ request: some FetchKeyRequest<Value>,
144144
database: (any DatabaseReader)? = nil,
145145
scheduler: some ValueObservationScheduler & Hashable
146-
) async throws -> FetchSubscription<Value> {
146+
) async throws -> FetchSubscription {
147147
try await sharedReader.load(.fetch(request, database: database, scheduler: scheduler))
148148
return FetchSubscription(sharedReader: sharedReader)
149149
}
@@ -204,7 +204,7 @@ extension Fetch: Equatable where Value: Equatable {
204204
_ request: some FetchKeyRequest<Value>,
205205
database: (any DatabaseReader)? = nil,
206206
animation: Animation
207-
) async throws -> FetchSubscription<Value> {
207+
) async throws -> FetchSubscription {
208208
try await sharedReader.load(.fetch(request, database: database, animation: animation))
209209
return FetchSubscription(sharedReader: sharedReader)
210210
}

Sources/SQLiteData/FetchAll.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public struct FetchAll<Element: Sendable>: Sendable {
181181
public func load<S: SelectStatement>(
182182
_ statement: S,
183183
database: (any DatabaseReader)? = nil
184-
) async throws -> FetchSubscription<[Element]>
184+
) async throws -> FetchSubscription
185185
where
186186
Element == S.From.QueryOutput,
187187
S.QueryValue == (),
@@ -203,7 +203,7 @@ public struct FetchAll<Element: Sendable>: Sendable {
203203
public func load<V: QueryRepresentable>(
204204
_ statement: some StructuredQueriesCore.Statement<V>,
205205
database: (any DatabaseReader)? = nil
206-
) async throws -> FetchSubscription<[Element]>
206+
) async throws -> FetchSubscription
207207
where
208208
Element == V.QueryOutput,
209209
V.QueryOutput: Sendable
@@ -334,7 +334,7 @@ extension FetchAll {
334334
_ statement: S,
335335
database: (any DatabaseReader)? = nil,
336336
scheduler: some ValueObservationScheduler & Hashable
337-
) async throws -> FetchSubscription<[Element]>
337+
) async throws -> FetchSubscription
338338
where
339339
Element == S.From.QueryOutput,
340340
S.QueryValue == (),
@@ -359,7 +359,7 @@ extension FetchAll {
359359
_ statement: some StructuredQueriesCore.Statement<V>,
360360
database: (any DatabaseReader)? = nil,
361361
scheduler: some ValueObservationScheduler & Hashable
362-
) async throws -> FetchSubscription<[Element]>
362+
) async throws -> FetchSubscription
363363
where
364364
Element == V.QueryOutput,
365365
V.QueryOutput: Sendable
@@ -512,7 +512,7 @@ extension FetchAll: Equatable where Element: Equatable {
512512
_ statement: S,
513513
database: (any DatabaseReader)? = nil,
514514
animation: Animation
515-
) async throws -> FetchSubscription<[Element]>
515+
) async throws -> FetchSubscription
516516
where
517517
Element == S.From.QueryOutput,
518518
S.QueryValue == (),
@@ -538,7 +538,7 @@ extension FetchAll: Equatable where Element: Equatable {
538538
_ statement: some StructuredQueriesCore.Statement<V>,
539539
database: (any DatabaseReader)? = nil,
540540
animation: Animation
541-
) async throws -> FetchSubscription<[Element]>
541+
) async throws -> FetchSubscription
542542
where
543543
Element == V.QueryOutput,
544544
V.QueryOutput: Sendable

Sources/SQLiteData/FetchOne.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
304304
public func load<S: SelectStatement>(
305305
_ statement: S,
306306
database: (any DatabaseReader)? = nil
307-
) async throws -> FetchSubscription<Value>
307+
) async throws -> FetchSubscription
308308
where
309309
Value == S.From.QueryOutput,
310310
S.QueryValue == (),
@@ -325,7 +325,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
325325
public func load<V: QueryRepresentable>(
326326
_ statement: some StructuredQueriesCore.Statement<V>,
327327
database: (any DatabaseReader)? = nil
328-
) async throws -> FetchSubscription<Value>
328+
) async throws -> FetchSubscription
329329
where
330330
Value == V.QueryOutput
331331
{
@@ -346,7 +346,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
346346
public func load<V: QueryRepresentable>(
347347
_ statement: some StructuredQueriesCore.Statement<V>,
348348
database: (any DatabaseReader)? = nil
349-
) async throws -> FetchSubscription<Value>
349+
) async throws -> FetchSubscription
350350
where
351351
Value == V.QueryOutput?
352352
{
@@ -367,7 +367,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
367367
public func load<S: SelectStatement>(
368368
_ statement: S,
369369
database: (any DatabaseReader)? = nil
370-
) async throws -> FetchSubscription<Value>
370+
) async throws -> FetchSubscription
371371
where
372372
Value: _OptionalProtocol,
373373
Value == S.From.QueryOutput?,
@@ -392,7 +392,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
392392
public func load<S: StructuredQueriesCore.Statement>(
393393
_ statement: S,
394394
database: (any DatabaseReader)? = nil
395-
) async throws -> FetchSubscription<Value>
395+
) async throws -> FetchSubscription
396396
where
397397
Value: _OptionalProtocol,
398398
S.QueryValue: QueryRepresentable,
@@ -416,7 +416,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
416416
public func load(
417417
_ statement: some StructuredQueriesCore.Statement<Value>,
418418
database: (any DatabaseReader)? = nil
419-
) async throws -> FetchSubscription<Value>
419+
) async throws -> FetchSubscription
420420
where
421421
Value: QueryRepresentable,
422422
Value: _OptionalProtocol,
@@ -702,7 +702,7 @@ extension FetchOne {
702702
_ statement: S,
703703
database: (any DatabaseReader)? = nil,
704704
scheduler: some ValueObservationScheduler & Hashable
705-
) async throws -> FetchSubscription<Value>
705+
) async throws -> FetchSubscription
706706
where
707707
Value == S.From.QueryOutput,
708708
S.QueryValue == (),
@@ -726,7 +726,7 @@ extension FetchOne {
726726
_ statement: some StructuredQueriesCore.Statement<V>,
727727
database: (any DatabaseReader)? = nil,
728728
scheduler: some ValueObservationScheduler & Hashable
729-
) async throws -> FetchSubscription<Value>
729+
) async throws -> FetchSubscription
730730
where
731731
Value == V.QueryOutput
732732
{
@@ -754,7 +754,7 @@ extension FetchOne {
754754
_ statement: some StructuredQueriesCore.Statement<V>,
755755
database: (any DatabaseReader)? = nil,
756756
scheduler: some ValueObservationScheduler & Hashable
757-
) async throws -> FetchSubscription<Value>
757+
) async throws -> FetchSubscription
758758
where
759759
Value == V.QueryOutput?
760760
{
@@ -782,7 +782,7 @@ extension FetchOne {
782782
_ statement: S,
783783
database: (any DatabaseReader)? = nil,
784784
scheduler: some ValueObservationScheduler & Hashable
785-
) async throws -> FetchSubscription<Value>
785+
) async throws -> FetchSubscription
786786
where
787787
Value: _OptionalProtocol,
788788
Value == S.From.QueryOutput?,
@@ -814,7 +814,7 @@ extension FetchOne {
814814
_ statement: S,
815815
database: (any DatabaseReader)? = nil,
816816
scheduler: some ValueObservationScheduler & Hashable
817-
) async throws -> FetchSubscription<Value>
817+
) async throws -> FetchSubscription
818818
where
819819
Value: _OptionalProtocol,
820820
S.QueryValue: QueryRepresentable,
@@ -845,7 +845,7 @@ extension FetchOne {
845845
_ statement: some StructuredQueriesCore.Statement<Value>,
846846
database: (any DatabaseReader)? = nil,
847847
scheduler: some ValueObservationScheduler & Hashable
848-
) async throws -> FetchSubscription<Value>
848+
) async throws -> FetchSubscription
849849
where
850850
Value: QueryRepresentable,
851851
Value: _OptionalProtocol,
@@ -1137,7 +1137,7 @@ extension FetchOne: Equatable where Value: Equatable {
11371137
_ statement: S,
11381138
database: (any DatabaseReader)? = nil,
11391139
animation: Animation
1140-
) async throws -> FetchSubscription<Value>
1140+
) async throws -> FetchSubscription
11411141
where
11421142
Value == S.From.QueryOutput,
11431143
S.QueryValue == (),
@@ -1161,7 +1161,7 @@ extension FetchOne: Equatable where Value: Equatable {
11611161
_ statement: some StructuredQueriesCore.Statement<V>,
11621162
database: (any DatabaseReader)? = nil,
11631163
animation: Animation
1164-
) async throws -> FetchSubscription<Value>
1164+
) async throws -> FetchSubscription
11651165
where
11661166
Value == V.QueryOutput
11671167
{
@@ -1183,7 +1183,7 @@ extension FetchOne: Equatable where Value: Equatable {
11831183
_ statement: some StructuredQueriesCore.Statement<V>,
11841184
database: (any DatabaseReader)? = nil,
11851185
animation: Animation
1186-
) async throws -> FetchSubscription<Value>
1186+
) async throws -> FetchSubscription
11871187
where
11881188
Value == V.QueryOutput?
11891189
{
@@ -1205,7 +1205,7 @@ extension FetchOne: Equatable where Value: Equatable {
12051205
_ statement: S,
12061206
database: (any DatabaseReader)? = nil,
12071207
animation: Animation
1208-
) async throws -> FetchSubscription<Value>
1208+
) async throws -> FetchSubscription
12091209
where
12101210
Value: _OptionalProtocol,
12111211
Value == S.From.QueryOutput?,
@@ -1230,7 +1230,7 @@ extension FetchOne: Equatable where Value: Equatable {
12301230
_ statement: S,
12311231
database: (any DatabaseReader)? = nil,
12321232
animation: Animation
1233-
) async throws -> FetchSubscription<Value>
1233+
) async throws -> FetchSubscription
12341234
where
12351235
Value: _OptionalProtocol,
12361236
S.QueryValue: QueryRepresentable,
@@ -1255,7 +1255,7 @@ extension FetchOne: Equatable where Value: Equatable {
12551255
_ statement: some StructuredQueriesCore.Statement<Value>,
12561256
database: (any DatabaseReader)? = nil,
12571257
animation: Animation
1258-
) async throws -> FetchSubscription<Value>
1258+
) async throws -> FetchSubscription
12591259
where
12601260
Value: QueryRepresentable,
12611261
Value: _OptionalProtocol,

0 commit comments

Comments
 (0)