Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: GT::SQL::Sets -- Need Some Help

Quote Reply
Re: GT::SQL::Sets -- Need Some Help In reply to
<Edited: 12-Jun-01 10:05 AM PST>

Thanks for the reply Alex. I'm still confused about the calling convention though. Lets say that I wanted to get a list of Links that are in categories 1, 2, 3, and their corresponding sub-categories. And I wanted to exclude category 4 links, where category 4 is a subcategory of category 1.

How could I do that using your SQL::Sets interface, rather than writing the queries myself, having to take all of the table relationships into consideration?

I could do it like this:
Code:
Table->do("CREATE TEMPORARY TABLE tmp SELECT ...");
Table->do("DELETE FROM tmp ...");
But this would be a kludge compared to the SQL::Sets interface. What if the relationships change one day, then the above code must be hunted down, and revised. Also, the statements that I come up with might not be portable to other SQL servers. Seems like the most readable/portable solution is to use the Sets module, and let the SQL::Driver and friends figure out how to talk to the server for us, depending on the backend.

-Steven


Subject Author Views Date
Thread GT::SQL::Sets -- Need Some Help shetland 3942 Jun 10, 2001, 5:27 AM
Thread Re: GT::SQL::Sets -- Need Some Help
Alex 3861 Jun 11, 2001, 3:16 PM
Thread Re: GT::SQL::Sets -- Need Some Help
shetland 3846 Jun 11, 2001, 4:57 PM
Thread Re: GT::SQL::Sets -- Need Some Help
shetland 3829 Jun 12, 2001, 10:42 AM
Post Re: GT::SQL::Sets -- Need Some Help
kitsune 3780 Jun 18, 2001, 3:56 PM