An '%' in a raw sql statement executed with execute will raise
following error because it is not properly escaped:

<class 'sqlalchemy.exceptions.DBAPIError'>: (TypeError) 'dict' object
is unindexable
2007/10/22 12:55:01 - /usr/lib/python2.5/site-packages/
SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/engine/base.py:1115:execute
2007/10/22 12:55:01 - /usr/lib/python2.5/site-packages/
SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/engine/base.py:779:execute
2007/10/22 12:55:01 - /usr/lib/python2.5/site-packages/
SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/engine/base.py:789:_execute_text
2007/10/22 12:55:01 - /usr/lib/python2.5/site-packages/
SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/engine/base.py:852:__execute_raw
2007/10/22 12:55:01 - /usr/lib/python2.5/site-packages/
SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/engine/base.py:
869:_cursor_execute

Manuall escaping with '%%' solves the issue, but shouldn't that be
automatic ?
Others, like twisted adbapi does it correct - for example.

Steffen


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to