SQL Smart Folder?

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.

SQL Smart Folder?

Postby noisyscott » Sun Mar 21, 2010 4:43 pm

Hello,

Would it be possible to create a Smart Folder based on an SQL query? I have been messing about with some simple SQL queries recently and have had a go at creating some more complicated searches using my DVDpedia and CDpedia databases as a testing ground. I understand that we would have to have some limitations on the usable SQL commands (i.e. only allow commands that do not actually modify the database) but thought this might be useful for the more advanced and adventurous users out there.

Thanks!

Scott
noisyscott
Addicted to Bruji
Addicted to Bruji
 
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

Re: SQL Smart Folder?

Postby Conor » Mon Mar 22, 2010 1:09 pm

Thank you for the suggestion. Although an advance option like that would be useful, it's technically quite complicated. Although the database is stored in SQLite format it's abstracted away by Core Data, which handles the database for DVDpedia. Core Date a great technology but it has it's limitations. One of those limitations is that it does not handle raw SQL commands. All smart searches are constructed using Cocoa NSPredicate objects that are also not simple to display to the user for customization. If your interested in more details about Core Data, there was an interesting article written by the developer of NetNewsWire of why he switched away from Core Data to SQL access directly for his iPhone version (mainly to do large updates without bringing objects into memory).
User avatar
Conor
Top Dog
 
Posts: 5281
Joined: Sat Jul 03, 2004 12:58 pm

Re: SQL Smart Folder?

Postby noisyscott » Mon Mar 22, 2010 5:15 pm

Ah, I see. Well thanks for letting me know about that Conor. I had no idea...
noisyscott
Addicted to Bruji
Addicted to Bruji
 
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

Re: SQL Smart Folder?

Postby Conor » Tue Mar 23, 2010 7:08 am

I'll keep it in mind for the future, as Core Data is always improving and it might become possible.
User avatar
Conor
Top Dog
 
Posts: 5281
Joined: Sat Jul 03, 2004 12:58 pm


Return to Feature Requests

cron