On 9/10/07, Kevin Cole <[EMAIL PROTECTED]> wrote: > > With TurboGears, Elixir, and PostgreSQL, is there an easy way to take > advantage of the views I've already created? I'm not the most savvy > SQL user, but have worked out these ugly-looking SQL select > statements, and would like them not to go to waste.
We use this in Smolt. The basic usage is to create a table that matches the view, and then where needed, map the table to a class. Since a VIEW also supports SELECT, sqlalchemy has no problems with it. As for Elixer, I don't know exactly. The key thing to remember is that any statement that doesn't use INSERT or UPDATE works on the view. If you want to see an example, have a look at our source code at: https://hosted.fedoraproject.org/projects/smolt/ -Yaakov --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

