Closed mdecurtins closed 2 years ago
This is indeed expected behavior. The first statement is a DML returning statement and the documentation on DML returning statements applies. The second statement is a PL/SQL statement. The fact that you have a DML returning statement embedded in it is not relevant. :-)
Of course, makes sense. Thanks for the clarification!
Hi,
It looks like DML statements (affecting a single row only) with
RETURNING INTO
clauses with out binds do not always return a single-element array when the statement is wrapped in an anonymous PL/SQL block (BEGIN ... END;
). The API docs section on DML RETURNING bin parameters indicates that "each DML RETURNING bind OUT parameter is returned as an array containing zero or more elements."That is, the
outBinds
are single-element arrays, as expected, with the following SQL:The
outBinds
are not arrays, however, when this DML statement is wrapped in a PL/SQL block:I'm aware we're running an older version of
node-oracledb
, but I can't tell whetherRETURNING INTO
bind behavior has changed between 4.2 and the current stable version 5.3 (it doesn't appear to have changed, that I can tell).Just looking to confirm if this is intended behavior. Thanks!
Versions: Oracle DB version: 19c NodeJS version 12.22.12 Ubuntu 20.04 linux/x86_64 node-oracledb 4.2.0 Oracle Instant Client 12.2.0.1