Skip to content

Add result updates to LiveQuery - #44

Merged
prachigauriar merged 1 commit into
mainfrom
live-query-result-updates
Nov 25, 2026
Merged

prachigauriar merged 1 commit into
mainfrom
live-query-result-updates

Conversation

@prachigauriar

Copy link
Copy Markdown
Collaborator
  • Add LiveQueryResultUpdatesProducer, which returns an AsyncSequence
    of results for each query fragment, and
    LiveQuery.init(resultUpdatesProducer:). Each value the sequence
    produces replaces the live query’s results.
  • Make LiveQueryResultsProducer refine LiveQueryResultUpdatesProducer,
    with a default resultUpdates(forQueryFragment:) that produces
    results once. Existing conformances don’t need to change.
  • Cancel result production for a query fragment when a newer fragment
    arrives, and discard results that arrive for superseded fragments.
    This changes behavior for existing results producers.
  • Document what happens when a query fragment canonicalizes to nil.
  • Wait for live query state with Observations in tests instead of
    mock epilogues, which fire before the live query writes results.
  • Add MockLiveQueryResultUpdatesProducer and ClosureAsyncSequence for
    testing.
  • Add release notes to 1.12.0.

  - Add LiveQueryResultUpdatesProducer, which returns an AsyncSequence
    of results for each query fragment, and
    LiveQuery.init(resultUpdatesProducer:). Each value the sequence
    produces replaces the live query’s results.
  - Make LiveQueryResultsProducer refine LiveQueryResultUpdatesProducer,
    with a default resultUpdates(forQueryFragment:) that produces
    results once. Existing conformances don’t need to change.
  - Cancel result production for a query fragment when a newer fragment
    arrives, and discard results that arrive for superseded fragments.
    This changes behavior for existing results producers.
  - Document what happens when a query fragment canonicalizes to nil.
  - Wait for live query state with Observations in tests instead of
    mock epilogues, which fire before the live query writes results.
  - Add MockLiveQueryResultUpdatesProducer and ClosureAsyncSequence for
    testing.
  - Add release notes to 1.12.0.
@prachigauriar
prachigauriar merged commit 371c778 into main Nov 25, 2026
6 checks passed
@prachigauriar
prachigauriar deleted the live-query-result-updates branch November 25, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant