|
drizzle
C++ MySQL-protocol-compatible database server
|
#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 |
| Public Member Functions inherited from drizzled::decimal_t | |
| void | set_zero () |
| void | negate () |
| int | isZero () const |
Private Attributes | |
| decimal_digit_t | buffer [DECIMAL_BUFF_LENGTH] |
Additional Inherited Members | |
| Public Attributes inherited from drizzled::decimal_t | |
| int | intg |
| int | frac |
| int | len |
| bool | sign |
| decimal_digit_t * | buf |
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.
Definition at line 183 of file type/decimal.h.
|
inline |
Definition at line 200 of file type/decimal.h.
|
inline |
Definition at line 239 of file type/decimal.h.
| void drizzled::type::Decimal::convert | ( | double & | value | ) | const |
Definition at line 314 of file type/decimal.cc.
|
inline |
Definition at line 205 of file type/decimal.h.
|
inline |
Definition at line 189 of file type/decimal.h.
|
inline |
Definition at line 208 of file type/decimal.h.
|
inline |
Definition at line 206 of file type/decimal.h.
|
inline |
Definition at line 207 of file type/decimal.h.
|
inline |
Definition at line 229 of file type/decimal.h.
| 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 283 of file type/decimal.cc.
|
inline |
Definition at line 234 of file type/decimal.h.
|
inline |
Definition at line 220 of file type/decimal.h.
| int drizzled::type::Decimal::val_binary | ( | uint32_t | mask, |
| unsigned char * | bin, | ||
| int | prec, | ||
| int | scale ) const |
Definition at line 246 of file type/decimal.cc.
|
inline |
Definition at line 210 of file type/decimal.h.
|
private |
Definition at line 185 of file type/decimal.h.