Implement paginated enumeration#81
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds paginated enumeration support to the file provider by extending both the core Enumerator logic and its mocks/tests.
- Changed
RemoteInterface.enumerateto returnAFDataResponse<Data>?and threaded pagination tokens/counts through. - Updated
Enumerator.readServerUrland its helpers to accept/produce pagination settings andEnumeratorPageResponse. - Added new pagination-focused tests (
EnumeratorPageResponseTests,testFolderPaginatedEnumeration) and removed obsolete flags in existing database manager tests.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/NextcloudFileProviderKitTests/FilesDatabaseManagerTests.swift | Removed obsolete updateDirectoryEtags parameters from calls. |
| Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift | Updated enumeration tests for paginated behavior; renamed one test. |
| Tests/NextcloudFileProviderKitTests/EnumeratorPageResponseTests.swift | New suite testing header parsing for pagination responses. |
| Tests/Interface/MockRemoteInterface.swift | Enhanced mock to generate pagination headers and token logic. |
| Sources/.../NKRequestOptions+Extensions.swift | Added convenience init for pagination parameters. |
| Sources/.../Enumeration/EnumeratorPageResponse.swift | New type to parse pagination headers from responses. |
| Sources/.../Enumeration/Enumerator.swift | Core changes to drive pagination: pageSize, pageNum, updated enumerateItems and readServerUrl. |
| Sources/.../Interface/RemoteInterface.swift | Updated protocol to return AFDataResponse<Data>?. |
| Sources/.../Interface/NextcloudKit+RemoteInterface.swift | Adjusted continuation to return the new response type. |
| Sources/.../Database/FilesDatabaseManager.swift | Removed updateDirectoryEtags parameter from methods. |
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
…erate request Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
c0e8e17 to
9db4e5e
Compare
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #81 +/- ##
==========================================
+ Coverage 82.14% 82.53% +0.38%
==========================================
Files 68 71 +3
Lines 14369 14603 +234
==========================================
+ Hits 11804 12053 +249
+ Misses 2565 2550 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.