Commit 3c84e74
committed
Add AsyncSequence support for Firestore
This change introduces support for `AsyncSequence` to `DocumentReference` and `Query`, allowing developers to use `for await in` to receive real-time updates from Firestore.
The implementation wraps the existing snapshot listener APIs in an `AsyncThrowingStream`, providing a modern, Swift-native way to work with real-time data.
This change also includes unit tests for the new functionality.1 parent 4f7dd49 commit 3c84e74
File tree
3 files changed
+25
-28
lines changed- Firestore/Swift
- Source/AsyncAwait
- Tests/Unit/AsyncAwait
3 files changed
+25
-28
lines changedLines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | | - | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | | - | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
Lines changed: 11 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 42 | + | |
| 43 | + | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
| |||
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 53 | + | |
| 54 | + | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
67 | 62 | | |
68 | 63 | | |
69 | 64 | | |
| |||
180 | 175 | | |
181 | 176 | | |
182 | 177 | | |
183 | | - | |
| 178 | + | |
0 commit comments