Closed wuarmin closed 6 years ago
However, while NUMBER uses decimal precision, BINARY_FLOAT and BINARY_DOUBLE use binary precision.
See: https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT1834
@ZaWertun Thank you for the info. But I still don't know how to achieve a mapping to ruby-Float-class. Furthermore the mapping-table says that BINARY_FLOATS and BINARY_DOUBLES should also mapped to Float class...
OCI8::BindType::Mapping[:number] = OCI8::BindType::Float
Oracle numbers are converted to Float even when the precision and scale are out of range of Float.
Thank you for the clarification!
Hello, I cannot figure out why Oracle FLOAT columns are mapped to ruby BigDecimal class by default. Corresponding to following link https://github.com/kubo/ruby-oci8/blob/master/docs/number-type-mapping.md it should be mapped to Ruby Float class.
I don't know why, but following mapping-change
changes the behavior(the FLOAT columns are mapped to Integer- or Float-Class), but I don't know why, because the Oracle Type of my columns are definitely FLOAT.
Maybe somebody can help me? How to achieve a mapping to Ruby Float class. Thx