diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-12-06 19:30:49 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-12-06 19:30:49 -0500 |
| commit | 9d817406e2da0bda91c1e9a1411165f229e3d5c2 (patch) | |
| tree | 312d95d584b2e6d6a0314d6c3802f6aee6a6681e /lib/sqlalchemy | |
| parent | 8f55656186cc5e38e3f5bb4d1bbca1f3899954d2 (diff) | |
| download | sqlalchemy-9d817406e2da0bda91c1e9a1411165f229e3d5c2.tar.gz | |
The Oracle LONG type, while an unbounded text type, does not appear
to use the cx_Oracle.LOB type when result rows are returned,
so the dialect has been repaired to exclude LONG from
having cx_Oracle.LOB filtering applied. Also in 0.7.10.
[ticket:2620]
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/oracle/cx_oracle.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py index 8b60d9af8..c5d9e8a89 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -303,6 +303,13 @@ class _OracleText(_LOBMixin, sqltypes.Text): return dbapi.CLOB +class _OracleLong(oracle.LONG): + # a raw LONG is a text type, but does *not* + # get the LobMixin with cx_oracle. + + def get_dbapi_type(self, dbapi): + return dbapi.LONG_STRING + class _OracleString(_NativeUnicodeMixin, sqltypes.String): pass @@ -532,6 +539,10 @@ class OracleDialect_cx_oracle(OracleDialect): sqltypes.UnicodeText: _OracleUnicodeText, sqltypes.CHAR: _OracleChar, + # a raw LONG is a text type, but does *not* + # get the LobMixin with cx_oracle. + oracle.LONG: _OracleLong, + # this is only needed for OUT parameters. # it would be nice if we could not use it otherwise. sqltypes.Integer: _OracleInteger, |
