Using CloudKit on iOS, is it possible to determine the number of records that a particular query matches?
I'm not actually interested in reading the records themselves, I simply want to know how many records are matched by a query. I'm aware that matched records are returned in batches, so in principle I could obtain each batch of records, and calculate the total number of records by summing the number in each batch. However, the number of matched records will likely be large for this application, and given I'm not interested in the actual record content, this seems inefficient and wasteful.
Thanks in advance.
There are no aggregation functions in CloudKit. The only way to do a count is by fetching all records.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With