Closed marianc000 closed 3 months ago
Thanks for the details. We are checking and will update.
@marianc000 For the object which is a collection of such key/values, Does the below code work for you? The iterable object returned from such collection is an array of values today and a new API might be needed to retain the existing behaviour.
const iat = r.outBinds.ret;
for (const key of iat.getKeys()) {
console.log(`${key}: ${iat[key]}`);
}
o/p:
2: 22
5: 55
or you can retrieve iat.getKeys() for keys and iat.getValues for values.
@marianc000 Request you to please try @sudarshan12s's suggestion from the comment above.
@marianc000 This has been fixed as part of node-oracledb 6.4. The fix is available here.
Hello
I am using oracledb 6.2.0. Your library is a very helpful and powerful tool. But there is a limitation. Associative arrays in javascript are more similar to objects. They can be represented as arrays when they are indexed by pls_integer but when the library converts an associative array into a javascript array, the keys are disregarded.
For example
The result is: 22 55
But it should be undefined 22 undefined undefined 55
Or even better it could by an object {2: 22, 5: 55}
This limitation makes library not useful for work with associative arrays.
The keys are present in the source data
So it could be a great improvement with a minor change in the code.
Thank you Best regards, Marian