AttributeError: 'OracleTypeCompiler' object has no attribute 'visit_LONG'

Issue #2401 resolved
Former user created an issue

Hi!

When doing some reflection about the column-types, eg. checking if a column is a string the following error occures:

AttributeError: 'OracleTypeCompiler' object has no attribute 'visit_LONG'

Suggested fix:

Add def visit_LONG(self, type_): return self.visit_text(type_)

to class OracleTypeCompiler

Sincerly, Gunter

Comments (6)

  1. Mike Bayer repo owner

    This is a bug but visit_LONG() needs to return the string "LONG". Can I get some more specifics on what you're doing ?

  2. Former user Account Deleted

    I am looping over the column-objects of a table:

    for col in table.c: if str(col.type) == "CHAR": ... do something ...

    The error occures in the str(col.type) statement when the column is in fact a LONG.

    I am using Oracle (did not mention this in my first post but could be interpolated ;-) ) with Jython 2.5.

  3. Mike Bayer repo owner

    so, OK if I have that compile out to "LONG"? the uppercase types have a behavioral contract that they always produce that exact type.

  4. Log in to comment