Skip to content

Conversation

@prachigauriar
Copy link
Collaborator

Introduces the LiveQuery subsystem, a set of types for managing
search-as-you-type functionality and other query-based operations. Live
queries automatically handle scheduling, deduplication, and caching as
query fragments change.

  • LiveQuery is a Sendable, Observable type that produces results as
    its query fragment changes. It coordinates between user input and
    result production, managing debouncing, duplicate removal, and error
    handling.
  • LiveQueryResultsProducer is a protocol that defines how to generate
    results for query fragments. Conforming types specify their
    scheduling strategy and implement result production logic.
  • LiveQuerySchedulingStrategy determines when results are generated:
    .passthrough for immediate results (best for cheap operations like
    local filtering), or .debounce(_:) to wait for typing to pause (best
    for expensive operations like network requests).

Introduces the LiveQuery subsystem, a set of types for managing
search-as-you-type functionality and other query-based operations. Live
queries automatically handle scheduling, deduplication, and caching as
query fragments change.

  - LiveQuery is a Sendable, Observable type that produces results as
    its query fragment changes. It coordinates between user input and
    result production, managing debouncing, duplicate removal, and error
    handling.
  - LiveQueryResultsProducer is a protocol that defines how to generate
    results for query fragments. Conforming types specify their
    scheduling strategy and implement result production logic.
  - LiveQuerySchedulingStrategy determines when results are generated:
    .passthrough for immediate results (best for cheap operations like
    local filtering), or .debounce(_:) to wait for typing to pause (best
    for expensive operations like network requests).
@github-actions
Copy link

Code Coverage Report

Overall Coverage: 99.48% (2,121 of 2,132)

DevFoundation: 99.48% (2,121 of 2,132)
File Coverage Covered Lines Executable Lines
AnyRequestCondition.swift 100.00% 9 9
AnySendableHashable.swift 100.00% 6 6
BodyEquals.swift 100.00% 12 12
BodyEqualsDecodable.swift 100.00% 22 22
ContextualBusEventObserver.swift 100.00% 148 148
Data+Obfuscation.swift 100.00% 63 63
DateProviders.swift 100.00% 19 19
DevFoundation.swift 100.00% 3 3
DispatchQueue+NonOvercommitting.swift 100.00% 9 9
DottedHierarchicalID.swift 100.00% 47 47
Duration+TimeInterval.swift 100.00% 3 3
EventBus.swift 100.00% 31 31
ExecutionGroup.swift 100.00% 51 51
ExpiringValue.swift 100.00% 23 23
FixedWidthInteger+BigEndianData.swift 100.00% 29 29
GibberishGenerator.swift 100.00% 199 199
HashableByID.swift 100.00% 6 6
HeaderItemsContains.swift 100.00% 12 12
HeaderItemsEquals.swift 100.00% 13 13
HostIsOneOf.swift 93.75% 15 16
HTTPBody.swift 100.00% 4 4
HTTPClient.swift 100.00% 61 61
HTTPHeaderField.swift 100.00% 15 15
HTTPHeaderItem.swift 100.00% 49 49
HTTPMethod.swift 100.00% 3 3
HTTPMethodIsOneOf.swift 100.00% 16 16
HTTPResponse.swift 100.00% 40 40
HTTPStatusCode.swift 100.00% 25 25
IdentifiableBySelf.swift 100.00% 3 3
InvalidHTTPStatusCodeError.swift 100.00% 6 6
InvalidWebServiceRequestError.swift 100.00% 4 4
JSONBodyWebServiceRequest.swift 100.00% 6 6
JSONValue.swift 100.00% 339 339
LiveQuery.swift 99.11% 111 112
LiveQueryResultsProducer.swift 100.00% 8 8
LiveQuerySchedulingStrategy.swift 100.00% 3 3
MediaType.swift 100.00% 6 6
NonHTTPURLResponseError.swift 100.00% 3 3
ObservableReference.swift 100.00% 23 23
OffsetDateProvider.swift 100.00% 16 16
OffsetPage.swift 100.00% 3 3
OptionalRepresentable.swift 100.00% 3 3
PathMatches.swift 100.00% 17 17
QueryItemsContains.swift 100.00% 13 13
QueryItemsEquals.swift 100.00% 12 12
RandomAccessPager.swift 100.00% 53 53
RangeReplaceableCollection+RemoveFirst.swift 100.00% 4 4
RequestComponents.swift 100.00% 20 20
Responder.swift 96.25% 77 80
ResponseGenerator.swift 100.00% 74 74
Result+CatchingAsync.swift 100.00% 7 7
RetryPolicy.swift 100.00% 30 30
ScaledDateProvider.swift 100.00% 17 17
SchemeIsOneOf.swift 93.75% 15 16
SequentialPager.swift 100.00% 50 50
SimulatedURLRequestLoader.swift 100.00% 27 27
SingleBaseURLConfiguration.swift 100.00% 6 6
SoftwareComponentID.swift 100.00% 3 3
SuccessResponseTemplate.swift 100.00% 20 20
SystemDateProvider.swift 100.00% 6 6
TopLevelCoding.swift 100.00% 12 12
TypedExtensibleEnum.swift 100.00% 3 3
UnfulfillableRequestError.swift 100.00% 3 3
URLMatches.swift 100.00% 15 15
URLPathComponent.swift 100.00% 9 9
URLRequestLoader.swift 100.00% 3 3
UserSelection.swift 100.00% 7 7
WebServiceClient.swift 100.00% 15 15
WebServiceRequest.swift 94.37% 67 71
WithTimeout.swift 98.57% 69 70

@prachigauriar prachigauriar merged commit 17cc739 into main Oct 24, 2025
3 checks passed
@prachigauriar prachigauriar deleted the live-query branch October 24, 2025 20:14
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.

2 participants