How to check which records belong to a specific CKShare?

I need to know which records belong to a specific CKShare. I can retrieve a share for a single record, but then having the CKShare I can't check what other records belong to it.

Is there any better way to do it without fetching shares for the whole database and grouping them?

How to check which records belong to a specific CKShare?
 
 
Q