[odb-users] About MySQL type decimal

Aarón Bueno Villares abv150ci at gmail.com
Wed Feb 3 16:17:29 EST 2016


If I define the type of a field as a `DECIMAL(4, 2)` (for a MySQL engine),
what must be the C++ type of that field, `string`, `float`/`double` or
both? Because the docs says nothing about decimals.

Does ODB also test or round the value of the field?

For example, if my value has a value of 235.34 (or "23.457"), does ODB make
any kind of checking or rounding of the value? Or is it the responsability
of MySQL?

Best regards,
Aaron.


More information about the odb-users mailing list