-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Milestone
Description
Problem
Query operations are limited to 200 records and don't handle continuationMarker for pagination:
- Bushel:
BushelCloudKitService.queryRecords()returns max 200 records (line 71) - Celestra: Delete operations won't remove all records if count exceeds 200
The OpenAPI-generated types include continuationMarker fields, but they're never used.
Proposed Solution
- Implement continuation marker handling in query operations
- Add recursive/iterative query pattern:
func queryAllRecords(recordType: String) async throws -> [RecordInfo] {
var allRecords: [RecordInfo] = []
var continuationMarker: String? = nil
repeat {
let (records, marker) = try await queryRecords(
recordType: recordType,
continuationMarker: continuationMarker
)
allRecords.append(contentsOf: records)
continuationMarker = marker
} while continuationMarker != nil
return allRecords
}- Update batch delete operations to handle pagination
Impact
- Data Loss: Queries silently truncate large result sets
- Incomplete Operations: Delete operations leave orphaned records
- User Confusion: No indication that results are incomplete
Files Affected
- Examples/Bushel/Sources/BushelImages/CloudKit/BushelCloudKitService.swift:71
- Examples/Celestra/Sources/Celestra/Services/CloudKitService+Celestra.swift
- Sources/MistKit/Service/CloudKitService+RecordManaging.swift:52
- Sources/MistKit/Generated/Types.swift (continuationMarker fields exist but unused)
References
- PR update from writing blog post and examples #129 CodeRabbit Review: update from writing blog post and examples #129 (BushelCloudKitService.swift)
- Related: Feature: Add pagination support with continuation markers for query results #145 (pagination support), Add comprehensive test suite for Bushel demo #136
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request