Re: CoreData Indexing is it possible?
Re: CoreData Indexing is it possible?
- Subject: Re: CoreData Indexing is it possible?
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 18 Sep 2007 11:59:55 -0400
- Thread-topic: CoreData Indexing is it possible?
on 2007-09-18 9:05 AM, Giovanni Donelli at email@hidden wrote:
> Before I dig into it, could you please tell me whether you used the
> _NSCreateIndex call, or you implemented yourself a different mechanism to
> index a db. If so what is it based on? Just a general idea, I will then look
> up at the details on your webpage
I did NOT use _NSCreateIndex. (I don't know if it existed two years ago,
when I wrote this demo, but I certainly wasn't aware of it.)
I implemented indexes in the demo only because the demo is really about how
to make a Core Data application scriptable. AppleScript generally expects
objects to be indexed (although this certainly isn't necessary to
AppleScript). For that reason, I didn't have any special need for the
indexes to reflect any particular aspect of the data. I was therefore able
to pick a very simple protocol, which was to increment the last-index
counter every time a new object was added. On deletion, I decrement all
indexes beyond the deleted item, which obviously won't scale well.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden