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
342 stars 69 forks source link

Var.outconverter() is not writable #360

Closed leo-b closed 3 months ago

leo-b commented 4 months ago

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

cjbj commented 4 months ago

We'll review; thanks.

anthony-tuininga commented 3 months ago

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.

anthony-tuininga commented 3 months ago

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