AF wrote: > > Hello, > > I have a table of records in the database that I want to run read > queries against, but I do want to include all of them in the search. > (There are a couple of filtering parameters to exclude records from > the searched pool, including an aptly named "is_active" flag.) > > Traditionally, I would think to put this in to a VIEW, and let the DB > optimise out all the non-active records. > > Since SQLAlchemy does appear to support views, what is the correct way > to handle this? (Or did i miss it?) > > I am using declarative base.
a view looks just like a table to SQLAlchemy. the only thing that might not work is reflecting it. otherwise you can just pretend its a Table (just can't flush to it). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---