Closed kubo closed 2 years ago
You're correct. The values for double and float are converted to Oracle Number -- which has a different range of supported values. I think the reason for doing so was to make driver development simpler -- since they likely deal with Oracle Number for regular columns and rarely (if ever) deal with native doubles and floats. Internally Oracle is capable of storing Oracle Number inside JSON values as well -- and preserving the distinction might be more complex than most people are willing to deal with. I'll discuss with @cjbj and get back to you further on this matter. If you have further comments/suggestions I'd be happy to hear them!
@kubo do we have a current email address for you? Can you email me if you have a new one?
@cjbj My email address has not been changed for about twenty years.
@kubo I wonder if mail from oracle.com isn't reaching you? I've just sent you a test email.
This issue has been automatically marked as inactive because it has not been updated recently. It will be closed if no further activity occurs. Thank you for your contributions.
@anthony-tuininga you gave yourself an action item on this.
Apologies for the delay! I took a look and realised that there was no way to pass in native_double/native_float values directly. That has been corrected. Take a look and let me know if that resolves your issue. Thanks!
This issue has been automatically marked as inactive because it has not been updated recently. It will be closed if no further activity occurs. Thank you for your contributions.
@anthony-tuininga Thanks. I forgot to close this.
ODPI-C version: 4.1.0 Oracle client version: 21.1
According to this document, Oracle Database extends the set of standard JSON-language types to include
double
andfloat
. However ODPI-C supports it partially. Is it on purpose?JSON → Native
DPI_JZNVAL_DOUBLE
→DPI_ORACLE_TYPE_NUMBER
andDPI_NATIVE_TYPE_DOUBLE
DPI_JZNVAL_FLOAT
→DPI_ORACLE_TYPE_NUMBER
andDPI_NATIVE_TYPE_DOUBLE
Native → JSON
DPI_ORACLE_TYPE_NUMBER
andDPI_NATIVE_TYPE_DOUBLE
→DPI_JZNVAL_ORA_NUMBER
DPI_ORACLE_TYPE_NATIVE_DOUBLE
andDPI_NATIVE_TYPE_DOUBLE
→ ERRORDPI_ORACLE_TYPE_NATIVE_FLOAT
andDPI_NATIVE_TYPE_FLOAT
→ ERRORWhen a JSON value is got from DB and written back,
double
andfloat
in JSON are converted to Oracle number. (Well, this is a guess. I have no user accounts of Oracle 21c.)