Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 29, 2025

OSLC Query API required manual pagination handling and lacked async support. This adds IAsyncEnumerable<T> to enable lazy, async iteration over query results with automatic pagination.

Changes

  • OslcQuery.SubmitAsync<T>() - Returns IAsyncEnumerable<T> with internal lazy pagination; supports cancellation
  • OslcQueryResult.NextPageAsync() - Async method for fetching subsequent pages
  • Refactored OslcQueryResult constructors to reduce duplication

Usage

var query = new OslcQuery(client, capabilityUrl, queryParams);

await foreach (var resource in query.SubmitAsync<ChangeRequest>(cancellationToken))
{
    // Process resource - pages fetched lazily as needed
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Use IAsyncEnumerable for OSLC Query</issue_title>
<issue_description>Current API requires the querying to be done almost manually, does not support async, and is strictly chained (exposes paging nature of the OSLC Query API to the developer).

Instead, the desired state is to be able to run a query (async) and retrieve all results uniformly yet be lazy internally, refraining from unnecessarily eager pagination.

Relevant code locations:

  • OSLC4Net.Client.Oslc.Resources.OslcQuery.Submit and OslcQueryResult.
  • May also need to update OslcResponse &c. as per pagination LDP headers for any LDPC.

Additional considerations:

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 29, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Use IAsyncEnumerable for OSLC query support Add IAsyncEnumerable support for OSLC Query Nov 29, 2025
Copilot AI requested a review from berezovskyi November 29, 2025 21:42
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.

Use IAsyncEnumerable for OSLC Query

2 participants