Skip to content

Commit 4027735

Browse files
committed
wip
1 parent 1449acc commit 4027735

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

Sources/SQLiteData/Fetch.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public struct Fetch<Value: Sendable>: Sendable {
9898
/// - request: A request describing the data to fetch.
9999
/// - database: The database to read from. A value of `nil` will use the default database
100100
/// (`@Dependency(\.defaultDatabase)`).
101-
/// - Returns: A fetch task associated with the observation.
101+
/// - Returns: A subscription associated with the observation.
102102
public func load(
103103
_ request: some FetchKeyRequest<Value>,
104104
database: (any DatabaseReader)? = nil
@@ -138,7 +138,7 @@ extension Fetch {
138138
/// (`@Dependency(\.defaultDatabase)`).
139139
/// - scheduler: The scheduler to observe from. By default, database observation is performed
140140
/// asynchronously on the main queue.
141-
/// - Returns: A fetch task associated with the observation.
141+
/// - Returns: A subscription associated with the observation.
142142
public func load(
143143
_ request: some FetchKeyRequest<Value>,
144144
database: (any DatabaseReader)? = nil,
@@ -197,7 +197,7 @@ extension Fetch: Equatable where Value: Equatable {
197197
/// (`@Dependency(\.defaultDatabase)`).
198198
/// - animation: The animation to use for user interface changes that result from changes to
199199
/// the fetched results.
200-
/// - Returns: A fetch task associated with the observation.
200+
/// - Returns: A subscription associated with the observation.
201201
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
202202
@discardableResult
203203
public func load(

Sources/SQLiteData/FetchAll.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public struct FetchAll<Element: Sendable>: Sendable {
176176
/// - statement: A query associated with the wrapped value.
177177
/// - database: The database to read from. A value of `nil` will use the default database
178178
/// (`@Dependency(\.defaultDatabase)`).
179-
/// - Returns: A fetch task associated with the observation.
179+
/// - Returns: A subscription associated with the observation.
180180
@discardableResult
181181
public func load<S: SelectStatement>(
182182
_ statement: S,
@@ -198,7 +198,7 @@ public struct FetchAll<Element: Sendable>: Sendable {
198198
/// - statement: A query associated with the wrapped value.
199199
/// - database: The database to read from. A value of `nil` will use the default database
200200
/// (`@Dependency(\.defaultDatabase)`).
201-
/// - Returns: A fetch task associated with the observation.
201+
/// - Returns: A subscription associated with the observation.
202202
@discardableResult
203203
public func load<V: QueryRepresentable>(
204204
_ statement: some StructuredQueriesCore.Statement<V>,
@@ -328,7 +328,7 @@ extension FetchAll {
328328
/// (`@Dependency(\.defaultDatabase)`).
329329
/// - scheduler: The scheduler to observe from. By default, database observation is performed
330330
/// asynchronously on the main queue.
331-
/// - Returns: A fetch task associated with the observation.
331+
/// - Returns: A subscription associated with the observation.
332332
@discardableResult
333333
public func load<S: SelectStatement>(
334334
_ statement: S,
@@ -353,7 +353,7 @@ extension FetchAll {
353353
/// (`@Dependency(\.defaultDatabase)`).
354354
/// - scheduler: The scheduler to observe from. By default, database observation is performed
355355
/// asynchronously on the main queue.
356-
/// - Returns: A fetch task associated with the observation.
356+
/// - Returns: A subscription associated with the observation.
357357
@discardableResult
358358
public func load<V: QueryRepresentable>(
359359
_ statement: some StructuredQueriesCore.Statement<V>,
@@ -505,7 +505,7 @@ extension FetchAll: Equatable where Element: Equatable {
505505
/// (`@Dependency(\.defaultDatabase)`).
506506
/// - animation: The animation to use for user interface changes that result from changes to
507507
/// the fetched results.
508-
/// - Returns: A fetch task associated with the observation.
508+
/// - Returns: A subscription associated with the observation.
509509
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
510510
@discardableResult
511511
public func load<S: SelectStatement>(
@@ -531,7 +531,7 @@ extension FetchAll: Equatable where Element: Equatable {
531531
/// (`@Dependency(\.defaultDatabase)`).
532532
/// - animation: The animation to use for user interface changes that result from changes to
533533
/// the fetched results.
534-
/// - Returns: A fetch task associated with the observation.
534+
/// - Returns: A subscription associated with the observation.
535535
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
536536
@discardableResult
537537
public func load<V: QueryRepresentable>(

Sources/SQLiteData/FetchOne.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
299299
/// - statement: A query associated with the wrapped value.
300300
/// - database: The database to read from. A value of `nil` will use the default database
301301
/// (`@Dependency(\.defaultDatabase)`).
302-
/// - Returns: A fetch task associated with the observation.
302+
/// - Returns: A subscription associated with the observation.
303303
@discardableResult
304304
public func load<S: SelectStatement>(
305305
_ statement: S,
@@ -320,7 +320,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
320320
/// - statement: A query associated with the wrapped value.
321321
/// - database: The database to read from. A value of `nil` will use the default database
322322
/// (`@Dependency(\.defaultDatabase)`).
323-
/// - Returns: A fetch task associated with the observation.
323+
/// - Returns: A subscription associated with the observation.
324324
@discardableResult
325325
public func load<V: QueryRepresentable>(
326326
_ statement: some StructuredQueriesCore.Statement<V>,
@@ -341,7 +341,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
341341
/// - statement: A query associated with the wrapped value.
342342
/// - database: The database to read from. A value of `nil` will use the default database
343343
/// (`@Dependency(\.defaultDatabase)`).
344-
/// - Returns: A fetch task associated with the observation.
344+
/// - Returns: A subscription associated with the observation.
345345
@discardableResult
346346
public func load<V: QueryRepresentable>(
347347
_ statement: some StructuredQueriesCore.Statement<V>,
@@ -362,7 +362,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
362362
/// - statement: A query associated with the wrapped value.
363363
/// - database: The database to read from. A value of `nil` will use the default database
364364
/// (`@Dependency(\.defaultDatabase)`).
365-
/// - Returns: A fetch task associated with the observation.
365+
/// - Returns: A subscription associated with the observation.
366366
@discardableResult
367367
public func load<S: SelectStatement>(
368368
_ statement: S,
@@ -387,7 +387,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
387387
/// - statement: A query associated with the wrapped value.
388388
/// - database: The database to read from. A value of `nil` will use the default database
389389
/// (`@Dependency(\.defaultDatabase)`).
390-
/// - Returns: A fetch task associated with the observation.
390+
/// - Returns: A subscription associated with the observation.
391391
@discardableResult
392392
public func load<S: StructuredQueriesCore.Statement>(
393393
_ statement: S,
@@ -411,7 +411,7 @@ public struct FetchOne<Value: Sendable>: Sendable {
411411
/// - statement: A query associated with the wrapped value.
412412
/// - database: The database to read from. A value of `nil` will use the default database
413413
/// (`@Dependency(\.defaultDatabase)`).
414-
/// - Returns: A fetch task associated with the observation.
414+
/// - Returns: A subscription associated with the observation.
415415
@discardableResult
416416
public func load(
417417
_ statement: some StructuredQueriesCore.Statement<Value>,
@@ -696,7 +696,7 @@ extension FetchOne {
696696
/// (`@Dependency(\.defaultDatabase)`).
697697
/// - scheduler: The scheduler to observe from. By default, database observation is performed
698698
/// asynchronously on the main queue.
699-
/// - Returns: A fetch task associated with the observation.
699+
/// - Returns: A subscription associated with the observation.
700700
@discardableResult
701701
public func load<S: SelectStatement>(
702702
_ statement: S,
@@ -720,7 +720,7 @@ extension FetchOne {
720720
/// (`@Dependency(\.defaultDatabase)`).
721721
/// - scheduler: The scheduler to observe from. By default, database observation is performed
722722
/// asynchronously on the main queue.
723-
/// - Returns: A fetch task associated with the observation.
723+
/// - Returns: A subscription associated with the observation.
724724
@discardableResult
725725
public func load<V: QueryRepresentable>(
726726
_ statement: some StructuredQueriesCore.Statement<V>,
@@ -748,7 +748,7 @@ extension FetchOne {
748748
/// (`@Dependency(\.defaultDatabase)`).
749749
/// - scheduler: The scheduler to observe from. By default, database observation is performed
750750
/// asynchronously on the main queue.
751-
/// - Returns: A fetch task associated with the observation.
751+
/// - Returns: A subscription associated with the observation.
752752
@discardableResult
753753
public func load<V: QueryRepresentable>(
754754
_ statement: some StructuredQueriesCore.Statement<V>,
@@ -776,7 +776,7 @@ extension FetchOne {
776776
/// (`@Dependency(\.defaultDatabase)`).
777777
/// - scheduler: The scheduler to observe from. By default, database observation is performed
778778
/// asynchronously on the main queue.
779-
/// - Returns: A fetch task associated with the observation.
779+
/// - Returns: A subscription associated with the observation.
780780
@discardableResult
781781
public func load<S: SelectStatement>(
782782
_ statement: S,
@@ -808,7 +808,7 @@ extension FetchOne {
808808
/// (`@Dependency(\.defaultDatabase)`).
809809
/// - scheduler: The scheduler to observe from. By default, database observation is performed
810810
/// asynchronously on the main queue.
811-
/// - Returns: A fetch task associated with the observation.
811+
/// - Returns: A subscription associated with the observation.
812812
@discardableResult
813813
public func load<S: StructuredQueriesCore.Statement>(
814814
_ statement: S,
@@ -839,7 +839,7 @@ extension FetchOne {
839839
/// (`@Dependency(\.defaultDatabase)`).
840840
/// - scheduler: The scheduler to observe from. By default, database observation is performed
841841
/// asynchronously on the main queue.
842-
/// - Returns: A fetch task associated with the observation.
842+
/// - Returns: A subscription associated with the observation.
843843
@discardableResult
844844
public func load(
845845
_ statement: some StructuredQueriesCore.Statement<Value>,
@@ -1130,7 +1130,7 @@ extension FetchOne: Equatable where Value: Equatable {
11301130
/// (`@Dependency(\.defaultDatabase)`).
11311131
/// - animation: The animation to use for user interface changes that result from changes to
11321132
/// the fetched results.
1133-
/// - Returns: A fetch task associated with the observation.
1133+
/// - Returns: A subscription associated with the observation.
11341134
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
11351135
@discardableResult
11361136
public func load<S: SelectStatement>(
@@ -1154,7 +1154,7 @@ extension FetchOne: Equatable where Value: Equatable {
11541154
/// (`@Dependency(\.defaultDatabase)`).
11551155
/// - animation: The animation to use for user interface changes that result from changes to
11561156
/// the fetched results.
1157-
/// - Returns: A fetch task associated with the observation.
1157+
/// - Returns: A subscription associated with the observation.
11581158
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
11591159
@discardableResult
11601160
public func load<V: QueryRepresentable>(
@@ -1176,7 +1176,7 @@ extension FetchOne: Equatable where Value: Equatable {
11761176
/// (`@Dependency(\.defaultDatabase)`).
11771177
/// - animation: The animation to use for user interface changes that result from changes to
11781178
/// the fetched results.
1179-
/// - Returns: A fetch task associated with the observation.
1179+
/// - Returns: A subscription associated with the observation.
11801180
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
11811181
@discardableResult
11821182
public func load<V: QueryRepresentable>(
@@ -1198,7 +1198,7 @@ extension FetchOne: Equatable where Value: Equatable {
11981198
/// (`@Dependency(\.defaultDatabase)`).
11991199
/// - animation: The animation to use for user interface changes that result from changes to
12001200
/// the fetched results.
1201-
/// - Returns: A fetch task associated with the observation.
1201+
/// - Returns: A subscription associated with the observation.
12021202
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
12031203
@discardableResult
12041204
public func load<S: SelectStatement>(
@@ -1223,7 +1223,7 @@ extension FetchOne: Equatable where Value: Equatable {
12231223
/// (`@Dependency(\.defaultDatabase)`).
12241224
/// - animation: The animation to use for user interface changes that result from changes to
12251225
/// the fetched results.
1226-
/// - Returns: A fetch task associated with the observation.
1226+
/// - Returns: A subscription associated with the observation.
12271227
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
12281228
@discardableResult
12291229
public func load<S: StructuredQueriesCore.Statement>(
@@ -1248,7 +1248,7 @@ extension FetchOne: Equatable where Value: Equatable {
12481248
/// (`@Dependency(\.defaultDatabase)`).
12491249
/// - animation: The animation to use for user interface changes that result from changes to
12501250
/// the fetched results.
1251-
/// - Returns: A fetch task associated with the observation.
1251+
/// - Returns: A subscription associated with the observation.
12521252
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
12531253
@discardableResult
12541254
public func load(

Sources/SQLiteData/FetchSubscription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Perception
22
import Sharing
33

4-
/// A task associated with `@FetchAll`, `@FetchOne`, and `@Fetch` observation.
4+
/// A subscription associated with `@FetchAll`, `@FetchOne`, and `@Fetch` observation.
55
///
66
/// This value can be useful in associating the lifetime of observing a query to the lifetime of a
77
/// SwiftUI view _via_ the `task` view modifier. For example, loading a query in a view's `task`

0 commit comments

Comments
 (0)