Re: Need advice: handling SQL DB based datasource for NSTableView
Re: Need advice: handling SQL DB based datasource for NSTableView
- Subject: Re: Need advice: handling SQL DB based datasource for NSTableView
- From: Edwin Zacharias <email@hidden>
- Date: Thu, 27 Mar 2003 10:31:10 -0800 (PST)
You should do the db call and switch to a cache later
if it's too slow - make sure your database is indexed
properly. In reality, NSTableView can make many
requests per second, so you will probably need a
cache.
If you want a nice wrapper framework for sqlite, you
could use the SQLDatabaseKit.
http://sourceforge.net/projects/outlaw
- Edwin
--- Guy Umbright <email@hidden> wrote:
>
What is the best (opinion only, I know) way to
>
handle this
>
kind of situation?
>
>
I have an NSTableView that is fed (via its
>
datasource) the
>
contents of an SQLite table. The two approaches I
>
see to
>
handle this are:
>
>
1) Make a db call each time the datasource callback
>
is invoked
>
>
2) Keep a 'snapshot' of the table in memory
>
(refreshed as needed)
>
and use it to provide the data
>
>
Of course there are some options sort of in the
>
middle of those
>
as well. From experience, what have others found to
>
be the best
>
approach to follow?
>
>
Guy
>
>
[sorry about the disclaimer]
>
>
>
This electronic mail message and any attached files
>
contain information
>
intended for the exclusive use of the individual or
>
entity to whom it is
>
addressed and may contain information that is
>
proprietary, privileged,
>
confidential and/or exempt from disclosure under
>
applicable law. If you are
>
not the intended recipient, you are hereby notified
>
that any viewing, copying,
>
disclosure or distribution of this information may
>
be subject to legal
>
restriction or sanction. Please notify the sender,
>
by electronic mail or
>
telephone, of any unintended recipients and delete
>
the original message
>
without making any copies.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.