diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-01-24 18:41:30 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-01-24 18:41:30 +0000 |
| commit | dd01f817b738a81bf9e5e4632387454f0f177dd6 (patch) | |
| tree | 4102b7da0d399469b0f0648f84ff2cfe5b558d43 /lib/sqlalchemy/dialects/firebird | |
| parent | 9806d81675ef62363753a028ada43bc460728cf5 (diff) | |
| download | sqlalchemy-dd01f817b738a81bf9e5e4632387454f0f177dd6.tar.gz | |
- oracle + firebird: "case sensitivity" feature will detect an all-lowercase
case-sensitive column name during reflect and add
"quote=True" to the generated Column, so that proper
quoting is maintained.
Diffstat (limited to 'lib/sqlalchemy/dialects/firebird')
| -rw-r--r-- | lib/sqlalchemy/dialects/firebird/base.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/firebird/base.py b/lib/sqlalchemy/dialects/firebird/base.py index aab217450..e4a2c568a 100644 --- a/lib/sqlalchemy/dialects/firebird/base.py +++ b/lib/sqlalchemy/dialects/firebird/base.py @@ -484,7 +484,8 @@ class FBDialect(default.DefaultDialect): if row is None: break name = self.normalize_name(row['fname']) - + orig_colname = row['fname'] + # get the data type colspec = row['ftype'].rstrip() coltype = self.ischema_names.get(colspec) @@ -523,6 +524,9 @@ class FBDialect(default.DefaultDialect): 'nullable' : not bool(row['null_flag']), 'default' : defvalue } + + if orig_colname.lower() == orig_colname: + col_d['quote'] = True # if the PK is a single field, try to see if its linked to # a sequence thru a trigger |
