Christoph Zwerschke wrote:
>
> But maybe there is some SQLAlchemy mechanism that allows to inject a
> variable SQL identifier into the query?

it seems a little complicated to add a feature for this when one could
just use the % operator...

>
> Such a function would need to check whether it is an ordinary SQL
> identifier (only chars, digits, underscore etc.) or a delimited
> identifier (can contain other chars). In the latter case, when the
> identifier has mixed case or contains other chars, then it should be
> automatically enclosed in double quotes, and quotes themselves need to
> be escaped (doubled).
>
> I suppose there is already something like that somewhere in SQLAlchemy
> that could be used here.

there is a capability within the dialect to determine the "quotability"
of SQL identifiers, via the "preparer()" function.  check out its
implementation in ansisql.py.  i can add the"preparer()" function and a
base class for the preparer itself to the base Dialect class which will
make this capability more public.


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

Reply via email to