Python library for generating SQL queries [selects, alters, inserts and commits]
Tim Chase
python.list at tim.thechases.com
Wed Oct 12 11:33:04 EDT 2011
On 10/11/11 22:13, alex23 wrote:
>> They look good, but I'm looking for something which can
>> "compile" down to normal SQL code.
>
> Then you're not looking hard enough. SQLAlchemy does this.
I'm not sure it can entirely be chalked up to not looking hard
enough. Because so many keywords of what's desired are
overloaded (e.g. "raw", "sql", "result", etc), it took me several
passes to learn that str(query_object) did this in SQLAlchemy,
and while I know there has to be SOME way to coerce it out of
SQLObject, I was unable to find anything other than setting the
connection-debug to True and having it print to the debugging
sink. And I had the advantage of years of programming Python &
SQL, and some pretty good Google-fu to guide me. For somebody
coming fresh to the field, it would be easy to miss.
-tkc
More information about the Python-list
mailing list