Re: [Python-Dev] building sql queries in python
Getting off on a tangent here, but I would actually like some decent way of writing SQL queries in Python -- not for importing, but for database access. Constructing bits of SQL out of character strings sucks *extremely* badly. Have you looked at SqlObject? (and its associated modules sqlobject.sqlbuilder in particular) http://www.sqlobject.org/module-sqlobject.sqlbuilder.html -greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] building sql queries in python
On 3/30/06, Gregory P. Smith [EMAIL PROTECTED] wrote: Getting off on a tangent here, but I would actually like some decent way of writing SQL queries in Python -- not for importing, but for database access. Constructing bits of SQL out of character strings sucks *extremely* badly.Have you looked at SqlObject?(and its associated modulessqlobject.sqlbuilder in particular)SQLAlchemy (www.sqlalchemy.org ) is also nice, in particular for more complex setups. I found it scales much better to the insanely complex SQL queries that our home-grown PostgreSQL/Perl setup needs, and it handles transactions the same way as our home-grown ORM too. There's plenty of ways to reliably and sanely avoid typing actual SQL in Python. -- Thomas Wouters [EMAIL PROTECTED]Hi! I'm a .signature virus! copy me into your .signature file to help me spread! ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] building sql queries in python
Thomas Wouters wrote: Have you looked at SqlObject? (and its associated modules sqlobject.sqlbuilder in particular) SQLAlchemy (www.sqlalchemy.org http://www.sqlalchemy.org) is also nice, in particular for more complex setups. There's plenty of ways to reliably and sanely avoid typing actual SQL in Python. Well, yes, but they all seem to be a bit hackish in one way or another -- e.g. SQLAlchemy's requirement to use , |, ~ instead of and, or, not. (That's one of the main motivations behind my Overloadable Boolean Operators PEP, by the way.) I'd like to see some way of attacking this problem head-on, rather than endlessly looking for convoluted ways around it. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com