Re: [Sqlalchemy-tickets] [sqlalchemy] #1233: NVARCHAR2 (oracle) type in not treated well
Brought to you by:
zzzeek
From: sqlalchemy <mi...@zz...> - 2008-11-24 20:24:14
|
#1233: NVARCHAR2 (oracle) type in not treated well --------------------------------+------------------------------------------- Reporter: guest | Owner: zzzeek Type: defect | Status: new Priority: medium | Milestone: 0.5.0 Component: oracle | Severity: no triage selected yet Resolution: | Keywords: reflection Status_field: awaiting triage | --------------------------------+------------------------------------------- Changes (by zzzeek): * keywords: => reflection * component: (none) => oracle * milestone: => 0.5.0 Comment: I'm assuming you are using reflection (please attach full test scripts to each ticket). possible patch. I will not have time to look at this for at least a week, if you feel like testing. {{{ Index: lib/sqlalchemy/databases/oracle.py =================================================================== --- lib/sqlalchemy/databases/oracle.py (revision 5330) +++ lib/sqlalchemy/databases/oracle.py (working copy) @@ -193,6 +193,10 @@ def get_col_spec(self): return "VARCHAR(%(length)s)" % {'length' : self.length} +class OracleUnicode(sqltypes.Unicode): + def get_col_spec(self): + return "NVARCHAR(%(length)s)" % {'length' : self.length} + class OracleText(sqltypes.Text): def get_dbapi_type(self, dbapi): return dbapi.CLOB @@ -288,6 +292,7 @@ ischema_names = { 'VARCHAR2' : OracleString, + 'NVARCHAR2' : OracleUnicode, 'CHAR' : OracleString, 'DATE' : OracleDateTime, 'DATETIME' : OracleDateTime, }}} -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1233#comment:2> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |