Oracle incorrect DDL handling
Sildra opened this issue · 2 comments
I sent a std::numeric_limits<long long>::max()
in a table created with the ddl, type dt_long_long (value 9223372036854775807), in the database, the value is -9223372036854775808.
Proposal for the fix :
Sildra@63d20b5
SOCI may truncate integer with 10 digits.
SOCI may ignore the sign of unsigned long long (integer with 20 digits).
SOCI handle doubles perfectly.
Using binary_double
for double
columns looks like a good idea (as an aside, we should drop get_double_sql_type()
and just use SQLT_BDOUBLE
, it seems useless to keep compatibility with Oracle 9.x and earlier which is surely not used any more?) and so does using the correct precision for number
, so please don't hesitate to make a PR with your changes.
If I could wish for something here, it would be to make the test code simpler to understand as it's really difficult to follow. Generally speaking, the more straightforward the testing code is, easier it is to fix any problems when it breaks, so it would be nice to keep it as simple as possible even at the price of making it less generic/complete.
TIA!