Open robin1607 opened 5 years ago
@robin1607 Could you post sample code to reproduce the issue?
create or replace package testpackage as
function exampleFunction
return json_object_t;
end testpackage;
create or replace package body testpackage as
function exampleFunction
return json_object_t
is
example_json_object json_object_t;
begin
example_json_object := new json_object_t;
example_json_object.put('testkey', 'testvalue');
return example_json_object;
end exampleFunction;
end testpackage;
/
json_object = plsql.testpackage.exampleFunction # Throws Error
puts json_object
Could you change the return type from json_objec_t
to varchar2
or clob
?
Ruby-oci8 converts object type attribute values to ruby values. However there are no methods to convert opaque types. This issue will be fixed by redesign of object type support, which I have had in mind since decade ago, though I have not noticed the opaque type issue. Well, the priority is low for me as long as there are workarounds.
Thanks for your answer. We have already thought about the workarounds, but for unit tests of small methods we would have to change our clear and structured system design of JSON handling. So the workarounds are not the best solution for us.
I understand the the redesign of object types has a low priority so we will find another way.
I'm getting 'unsupported typecode opaque' error when calling function which returns oracle json_object or json_array.