MySQL 8.0.39
Source Code Documentation
|
my_decimal class limits 'decimal_t' type to what we need in MySQL. More...
#include <my_decimal.h>
Public Member Functions | |
my_decimal (const my_decimal &rhs) | |
my_decimal & | operator= (const my_decimal &rhs) |
void | init () |
my_decimal () | |
~my_decimal () | |
void | sanity_check () const |
bool | sign () const |
void | sign (bool s) |
uint | precision () const |
void | swap (my_decimal &rhs) |
Swap two my_decimal values. More... | |
int | check_result (uint, int result) const |
report result of decimal operation. More... | |
Private Attributes | |
int | foo1 |
decimal_digit_t | buffer [DECIMAL_BUFF_LENGTH] |
int | foo2 |
Static Private Attributes | |
static const int | test_value = 123 |
Additional Inherited Members | |
Public Attributes inherited from decimal_t | |
int | intg |
int | frac |
int | len |
bool | sign |
decimal_digit_t * | buf |
my_decimal class limits 'decimal_t' type to what we need in MySQL.
It contains internally all necessary space needed by the instance so no extra memory is needed. Objects should be moved using copy CTOR or assignment operator, rather than memcpy/memmove.
|
inline |
|
inline |
|
inline |
int my_decimal::check_result | ( | uint | mask, |
int | result | ||
) | const |
report result of decimal operation.
mask | bitmask filtering result, most likely E_DEC_FATAL_ERROR |
result | decimal library return code (E_DEC_* see include/decimal.h) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Swap two my_decimal values.
|
private |
|
private |
|
private |
|
staticprivate |