On 2 Jan, 2006, at 7:44 pm, Jonathan LaCour wrote:
Why not just create an SQL view, and map the view as an SQLObject? This is often a good solution for classes of problems where query performance is more important than insert performance, like most web apps that I have seen.
First, SQLite doesn't support Views (as I understand) and since this is intended to be a sample that is distributed with a book (yes, TurboGears will be appearing in another book, but the primary subject is Ajax), I really want to stick with something that can be installed and run quickly: hence SQLite.
Mostly, I don't think this is *about* the query. The query runs just fine. The problem seems to be that SQLObject's transactions get all out of whack when I'm doing a real query.
Maybe one day SQLObject, or something else, will come along to make building reporting-like queries easier than writing raw SQL, but thats a pretty tall order.
You might want to take a look at SQLAlchemy <http://sqlalchemy.org/>. I think it's a much more full fledged solution to the problem. I've been working with the author Michael Bayer to add a declarative layer (similar to SQLObject) that would make it more attractive to many python developers.
Jeff -- Jeff Watkins http://newburyportion.com/

