Support for PL/SQL Object Types
Hi Guys,
are there any plans to support PL/SQL object types and their tables as IN/IN OUT/OUT parameters in PL/SQL procedures and functions ? If yes - maybe the very rough date is known?
Thanks and regards, Domas
why would you like something like that ? You just have to build a JSON Array with the data object from the oracle object type.
We are using pl/sql procedures based SOAP web services which use oracle objet types as procedure input and output parameters. The idea is to move to REST using node.js and node-oracle driver, but we need to be able to ivoke our pl/sql procedures which use oracle object types and they should remain intact.
Ok ok I got it.
My suggestion will be the same I think.
Just override the procedure with json / and create a utility function/procedure to transform json to an oracle object types.
I guess this approach would work only with Oracle 12c as JSON features were introduced in this version. Unfortunatelly we are using 11g and upgrading to 12c is not considered in the short term.
@dom-atom your initial request is being tracked in https://github.com/oracle/node-oracledb/issues/147 Follow that for updates. In the meantime you might look at writing your own PL/SQL wrapper to compose/decompose the complex types to scalar values that can be bound in node-oracledb calls. I think @nelreina is saying this, but using JSON as an intermediate type.
Regarding JSON, you can convert the output from many queries to JSON even without 12c: https://github.com/oracle/node-oracledb/issues/265#issuecomment-153150678