SQL Smart Folder?

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.
Post Reply
noisyscott
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

SQL Smart Folder?

Post by noisyscott »

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
User avatar
Conor
Top Dog
Posts: 5344
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: SQL Smart Folder?

Post by Conor »

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).
noisyscott
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

Re: SQL Smart Folder?

Post by noisyscott »

Ah, I see. Well thanks for letting me know about that Conor. I had no idea...
User avatar
Conor
Top Dog
Posts: 5344
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: SQL Smart Folder?

Post by Conor »

I'll keep it in mind for the future, as Core Data is always improving and it might become possible.
Post Reply