views:

290

answers:

1

I have a core data table with BLOBs in it. I'd like to do a query that does the equivalent of:

select sum(length(image)) from tablename;

That would return the total size of all the images in the table. Is this possible in core data?

+1  A: 

I'm not sure, but considering the fact that blob attribute has length method you may try doing the following:

[model valueForKeyPath:@"[email protected]"];
Eimantas