Good afternoon, I have this stored function definition in oracle db:
CREATE OR REPLACE FUNCTION GET_INFO(id IN VARCHAR2,
account IN VARCHAR2,
info out INFO_ITEM)
RETURN NUMBER
AS
rv NUMBER:= 0;
...
I am trying to get both return and out values using node-oracledb module:
const sql = `
DECLARE
info INFO_ITEM;
result NUMBER;
BEGIN
:result := GET_INFO(:id, :account, info);
END;
`;
const params = {
id: '123',
account: '123',
result: { dir: BIND_OUT },
};
const options = {
outFormat: oracledb.OUT_FORMAT_OBJECT,
};
oracleConnection.execute(sql, params, options)
I am getting the query result fine ({outBinds: {result: 1}}), but have troubles with figuring out how to get the output values. I am pretty new to PL/SQL queries, so if someone could give me an advice on how to approach this I would greatly appreciate it.