Living on the Edge

Getting a SqlAlchemy Quoted Name

Posted on March 05, 2008

Just because I spent so much time tracking it down, you can get the SqlAlchemy database-dependent quoted name for a column by doing:


>>> metadata.bind.dialect.identifier_preparer.quote_identifier("test")
'"test"'
>>>