diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-22 05:02:11 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-22 05:02:11 +0000 |
| commit | fe27b87023e99ff58371a6e689709a6ab2b5c3b7 (patch) | |
| tree | 28a3e75b0db771d1de297ad8b11ecc16a1d46eec /lib/sqlalchemy/databases | |
| parent | f7584a80f647864699d18dcdfceb9e3d25a36508 (diff) | |
| download | sqlalchemy-fe27b87023e99ff58371a6e689709a6ab2b5c3b7.tar.gz | |
updates to oracle
added more ordering to schema collections for better predictability
Diffstat (limited to 'lib/sqlalchemy/databases')
| -rw-r--r-- | lib/sqlalchemy/databases/oracle.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sqlalchemy/databases/oracle.py b/lib/sqlalchemy/databases/oracle.py index 91e54ea75..107dea163 100644 --- a/lib/sqlalchemy/databases/oracle.py +++ b/lib/sqlalchemy/databases/oracle.py @@ -5,7 +5,7 @@ # the MIT License: http://www.opensource.org/licenses/mit-license.php -import sys, StringIO, string +import sys, StringIO, string, re import sqlalchemy.util as util import sqlalchemy.sql as sql @@ -246,7 +246,11 @@ class OracleDialect(ansisql.ANSIDialect): elif coltype=='CHAR' or coltype=='VARCHAR2': coltype = ischema_names.get(coltype, OracleString)(length) else: - coltype = ischema_names.get(coltype) + coltype = re.sub(r'\(\d+\)', '', coltype) + try: + coltype = ischema_names[coltype] + except KeyError: + raise exceptions.AssertionError("Cant get coltype for type '%s'" % coltype) colargs = [] if default is not None: |
