detect DBAPI types ?

Issue #1179 resolved
Mike Bayer repo owner created an issue

Attached is a patch which produces DBAPI type matching for Oracle, MySQL and Postgres. Works for PG, probably will work for Oracle, works only partially for MySQL.

There's some cases where the feature doesn't work, and I wonder if this is just going to confuse the issue more by having another feature which still doesn't work consistently:

  • the Text and UnicodeText types with MySQL come back as "Binary". You'd have to ensure the type is created as UNICODE
  • the feature might not work with SQLite dates, which has no "DateTime" type. Didn't test yet.
  • SQLA-specific types, like PickleType, are not detectable at the DBAPI level.
  • there might be further bugs, particularly in MySQL, where we don't get the correct type back in cursor.description for some expressions

Patch is attached for review.

Comments (2)

  1. Log in to comment