#include <decimal.h>
Public Member Functions | |
| void | init () |
| void | fix_buffer_pointer () |
| bool | sign () const |
| void | sign (bool s) |
| uint32_t | precision () const |
| int | val_int32 (uint32_t mask, bool unsigned_flag, int64_t *l) const |
| int | string_length () const |
| int | val_binary (uint32_t mask, unsigned char *bin, int prec, int scale) const |
| int | store (uint32_t mask, const char *from, uint32_t length, const charset_info_st *charset) |
| Convert string for decimal when string can be in some multibyte charset. | |
| int | store (uint32_t mask, char *str, char **end) |
| int | store (uint32_t mask, const String *str) |
| int | check_result_and_overflow (uint32_t mask, int result) |
| void | convert (double &value) const |
| void | set_zero () |
| void | negate () |
| int | isZero () const |
Public Attributes | |
| int | intg |
| int | frac |
| int | len |
| bool | sign |
| decimal_digit_t * | buf |
Private Attributes | |
| decimal_digit_t | buffer [DECIMAL_BUFF_LENGTH] |
type 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. One should call fix_buffer_pointer() function when he moves type::Decimal objects in memory.
| int drizzled::type::Decimal::store | ( | uint32_t | mask, |
| const char * | from, | ||
| uint32_t | length, | ||
| const charset_info_st * | charset | ||
| ) |
Convert string for decimal when string can be in some multibyte charset.
| mask | error processing mask |
| from | string to process |
| length | length of given string |
| charset | charset of given string |
| E_DEC_OK | |
| E_DEC_TRUNCATED | |
| E_DEC_OVERFLOW | |
| E_DEC_BAD_NUM | |
| E_DEC_OOM |
Definition at line 285 of file decimal.cc.
Referenced by drizzled::Item_cache_str::val_decimal(), drizzled::Item_str_func::val_decimal(), drizzled::Item_func_numhybrid::val_decimal(), drizzled::Item_copy_string::val_decimal(), drizzled::user_var_entry::val_decimal(), and drizzled::Item_sum_hybrid::val_decimal().