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

Home Page:https://oracle.github.io/python-oracledb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Var.outconverter() is not writable

leo-b opened this issue · comments

Hi!

The latest oracledb documentation states that Variable.outconverter is a read-write attribute.
https://python-oracledb.readthedocs.io/en/latest/api_manual/variable.html#Variable.outconverter

However this doesn't seem to be true:

v = cursor.var(oracledb.DB_TYPE_NUMBER)
v.outconverter = lambda x: x
# AttributeError: property 'outconverter' of 'Var' object has no setter

Is the setter property missing or is the documentation wrong?

Cheers,
--leo

We'll review; thanks.

Since this method is called internally during cursor execution, having it changed midstream could make the results difficult to predict. I'll change the documentation to indicate that it is read-only -- but if you would like the ability to set this (and its sibliing inconverter), please provide the reason you would like to do so! Thanks.

The documentation has been updated. Thanks for bringing this to our attention!