How to get custom object from callfunc in cx_Oracle?
<p>I have an PL/SQL function <code>my_function</code> that returns custom defined object:</p>

<pre><code>CREATE OR REPLACE TYPE "TP_ACTION" AS OBJECT
   (
ââstop_time timestamp,
ââuser_name varchar2(64),
ââerror_msg tp_message_l,

CONSTRUCTOR FUNCTION TP_ACTION(
ââ usrnm in varchar2 := null
) RETURN SELF AS RESULT,

ââMEMBER PROCEDURE doClose(pi_session_MD5 INââVARCHAR2),
ââmember procedure setRunStatus(status in varchar2),
)  
</code></pre>

<p>Therefore in python I call that function:</p>

<pre><code>var_type = cursor.var(cx_Oracle.OBJECT, typename='TP_ACTION')
cursor.callfunc('my_function', var_type, params)
</code></pre>

<p>After that I get exception:</p>

<pre><code> cx_Oracle.NotSupportedError: Variable_TypeByPythonType(): unhandled data type.
</code></pre>

<p>Is it even possible to get custom definded object by calling PL/SQL function? Or maybe there is another way to get it?</p>

<p>The ability to bind Oracle objects is only available in the unreleased (development) version of cx_Oracle. This is needed for calling a function that returns an object. If you can make use of the development version your code will work; otherwise, please wait for the official release.</p>

python plsql cx-oracle