underscore. Courtesy Treeve Jelbert. [ticket:2897]
.. changelog::
:version: 0.8.5
+ .. change::
+ :tags: bug, firebird
+ :versions: 0.9.0b2
+ :tickets: 2897
+
+ The firebird dialect will quote identifiers which begin with an
+ underscore. Courtesy Treeve Jelbert.
+
.. change::
:tags: bug, firebird
:versions: 0.9.0b2
"""Install Firebird specific reserved words."""
reserved_words = RESERVED_WORDS
+ illegal_initial_characters = compiler.ILLEGAL_INITIAL_CHARACTERS.union(['_'])
def __init__(self, dialect):
super(FBIdentifierPreparer, self).__init__(dialect, omit_schema=True)
for type_, args, kw, res in columns:
self.assert_compile(type_(*args, **kw), res)
+ def test_quoting_initial_chars(self):
+ self.assert_compile(
+ column("_somecol"),
+ '"_somecol"'
+ )
+ self.assert_compile(
+ column("$somecol"),
+ '"$somecol"'
+ )
class TypesTest(fixtures.TestBase):
__only_on__ = 'firebird'