oracle / python-oracledb

Python driver for Oracle Database conforming to the Python DB API 2.0 specification. This is the renamed, new major release of cx_Oracle
https://oracle.github.io/python-oracledb
Other
307 stars 59 forks source link

Add way to handle DPY-3007: database type "DB_TYPE_INTERVAL_YM" is not supported #310

Closed rudyryk closed 1 month ago

rudyryk commented 3 months ago
  1. Describe your new request in detail

As known and described in the official documentation database type DB_TYPE_INTERVAL_YM is not supported. But what is unclear is how to mitigate this limitation.

For example, when running SELECT * FROM "MYDB"."SOMETABLE" an error is thrown:

DPY-3007: database type "DB_TYPE_INTERVAL_YM" is not supported

The expected behaviour would be to replace unsupported values with some UNSUPPORTED token or just None. Otherwise it's becomes impossible to use SELECT * in case when it's potentially possible to have unsupported types.

  1. Give supporting information about tools and operating systems. Give relevant product version numbers
anthony-tuininga commented 3 months ago

It shouldn't be too much effort to add a class specific to this since Python itself doesn't handle it. I'll consider it for 2.2.

anthony-tuininga commented 3 months ago

I have added the necessary code to support INTERVAL YEAR TO MONTH as requested. If you are able to build from source you can verify that it works for you, too.

anthony-tuininga commented 1 month ago

This was included in version 2.2.0 which was just released.