[sqlalchemy] Looking for examples of SQLAlchemy in WSGI apps

2009-07-13 Thread Matt Wilson
I'm writing a really tiny WSGI app just for fun. Right now, it looks like this: from flup.server.scgi import WSGIServer WSGIServer(s).run() The s object is the an app that dispatches to other apps based on the URL. Are there any instructions written for using SQLAlchemy in this context? I'm

[sqlalchemy] Re: Possible autoflush error when using backreferences to fill in multiple db required fields

2009-07-13 Thread rledley
Thank you for such a quick reply! I thought I might have to do something like that. Could you explain, though, for my own understanding, why the exception isn't raised the first time a Lesson is referenced through a backref? It's missing required fields at that point, so one would expect this

[sqlalchemy] Re: Looking for examples of SQLAlchemy in WSGI apps

2009-07-13 Thread Didip Kerabat
I think Werkzeug guys talk about this before. Werkzeug is barebone WSGI tools, which might suits your need? Hopefully this link helps: http://dev.pocoo.org/projects/werkzeug/wiki/SQLAlchemyAndWerkzeug - Didip - On Mon, Jul 13, 2009 at 8:15 AM, Matt Wilson m...@tplus1.com wrote: I'm writing a

[sqlalchemy] Re: Possible autoflush error when using backreferences to fill in multiple db required fields

2009-07-13 Thread Michael Bayer
rledley wrote: Thank you for such a quick reply! I thought I might have to do something like that. Could you explain, though, for my own understanding, why the exception isn't raised the first time a Lesson is referenced through a backref? It's missing required fields at that point, so one

[sqlalchemy] SQLAlchemy 0.5.5 released

2009-07-13 Thread Michael Bayer
SQLAlchemy 0.5.5 is now available. Download it at: http://www.sqlalchemy.org/download.html 0.5.5 === - general - unit tests have been migrated from unittest to nose. See README.unittests for information on how to run the tests. [ticket:970] - orm - The foreign_keys

[sqlalchemy] Column expressions and .count()

2009-07-13 Thread Brad Wells
Is it possible to perform a query.count() on a query with a labeled column expression without count() adding the subselect? I need to filter on the value of the expression and get a count for a paged view. --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: Column expressions and .count()

2009-07-13 Thread Michael Bayer
Brad Wells wrote: Is it possible to perform a query.count() on a query with a labeled column expression without count() adding the subselect? I need to filter on the value of the expression and get a count for a paged view. use query.value(func.count(some column)).I'm seriously

[sqlalchemy] Re: Column expressions and .count()

2009-07-13 Thread Michael Bayer
Brad Wells wrote: Is it possible to perform a query.count() on a query with a labeled column expression without count() adding the subselect? I need to filter on the value of the expression and get a count for a paged view. although reading the docs to query.count(), its pretty clear as far