SQL standard-compliant decimal number handling. More...
#include <config.h>#include <drizzled/definitions.h>#include <drizzled/internal/m_string.h>#include <drizzled/charset.h>#include <drizzled/type/decimal.h>#include <plugin/myisam/myisampack.h>#include <drizzled/util/test.h>#include <algorithm>#include <time.h>#include <drizzled/current_session.h>#include <drizzled/error.h>#include <drizzled/field.h>#include <drizzled/internal/my_sys.h>Go to the source code of this file.
Namespaces | |
| namespace | drizzled |
| TODO: Rename this file - func.h is stupid. | |
| namespace | drizzled::type |
| Convert from decimal to binary representation. | |
Macros | |
| #define | DIG_PER_DEC1 9 |
| #define | DIG_MASK 100000000 |
| #define | DIG_BASE 1000000000 |
| #define | DIG_MAX (DIG_BASE-1) |
| #define | sanity(d) |
Typedefs | |
| typedef decimal_digit_t | drizzled::dec1 |
| typedef int64_t | drizzled::dec2 |
Functions | |
| int | drizzled::decimal_operation_results (int result) |
| int | drizzled::class_decimal2string (const type::Decimal *d, uint32_t fixed_dec, String *str) |
| Converting decimal to string. | |
| type::Decimal * | drizzled::date2_class_decimal (type::Time *ltime, type::Decimal *dec) |
| void | drizzled::class_decimal_trim (uint32_t *precision, uint32_t *scale) |
| template<typename T > | |
| static T | drizzled::round_up (const T &x) |
| static void | drizzled::fix_intg_frac_error (const int len, int &intg1, int &frac1, int &error) |
| static void | drizzled::add (dec1 &to, const dec1 &from1, const dec1 &from2, dec1 &carry) |
| static void | drizzled::add2 (dec1 &to, const dec1 &from1, const dec1 &from2, dec1 &carry) |
| static void | drizzled::sub (dec1 &to, const dec1 &from1, const dec1 &from2, dec1 &carry) |
| static void | drizzled::sub2 (dec1 &to, const dec1 &from1, const dec1 &from2, dec1 &carry) |
| void | drizzled::max_decimal (int precision, int frac, decimal_t *to) |
| Get maximum value for given precision and scale. | |
| static dec1 * | drizzled::remove_leading_zeroes (const decimal_t *from, int *intg_result) |
| int | drizzled::decimal_actual_fraction (decimal_t *from) |
| Count actual length of fraction part (without ending zeroes) | |
| int | drizzled::decimal2string (const decimal_t *from, char *to, int *to_len, int fixed_precision, int fixed_decimals, char filler) |
| Convert decimal to its printable string representation. | |
| static void | drizzled::digits_bounds (decimal_t *from, int *start_result, int *end_result) |
| Return bounds of decimal digits in the number. | |
| static void | drizzled::do_mini_left_shift (decimal_t *dec, int shift, int beg, int last) |
| static void | drizzled::do_mini_right_shift (decimal_t *dec, int shift, int beg, int last) |
| Right shift for alignment of data in buffer. | |
| static int | drizzled::decimal_shift (decimal_t *dec, int shift) |
| Shift of decimal digits in given number (with rounding if it need) | |
| int | drizzled::internal_str2dec (char *from, decimal_t *to, char **end, bool fixed) |
| Convert string to decimal. | |
| int | drizzled::decimal2double (const decimal_t *from, double *to) |
| int | drizzled::double2decimal (const double from, decimal_t *to) |
| static int | drizzled::ull2dec (uint64_t from, decimal_t *to) |
| int | drizzled::uint64_t2decimal (const uint64_t from, decimal_t *to) |
| int | drizzled::int64_t2decimal (const int64_t from, decimal_t *to) |
| int | drizzled::decimal2uint64_t (const decimal_t *from, uint64_t *to) |
| int | drizzled::decimal2int64_t (const decimal_t *from, int64_t *to) |
| int | drizzled::decimal2bin (const decimal_t *from, unsigned char *to, int precision, int frac) |
| Convert decimal to its binary fixed-length representation (suitable for comparing with memcmp) | |
| int | drizzled::bin2decimal (const unsigned char *from, decimal_t *to, int precision, int scale) |
| Restores decimal from its binary fixed-length representation. | |
| int | drizzled::decimal_bin_size (int precision, int scale) |
| Returns the size of array to hold a binary representation of a decimal. | |
| int | drizzled::decimal_round (const decimal_t *from, decimal_t *to, int scale, decimal_round_mode mode) |
| Rounds the decimal to "scale" digits. | |
| static int | drizzled::do_add (const decimal_t *from1, const decimal_t *from2, decimal_t *to) |
| static int | drizzled::do_sub (const decimal_t *from1, const decimal_t *from2, decimal_t *to) |
| int | drizzled::decimal_intg (const decimal_t *from) |
| int | drizzled::decimal_add (const decimal_t *from1, const decimal_t *from2, decimal_t *to) |
| int | drizzled::decimal_sub (const decimal_t *from1, const decimal_t *from2, decimal_t *to) |
| int | drizzled::decimal_cmp (const decimal_t *from1, const decimal_t *from2) |
| int | drizzled::decimal_mul (const decimal_t *from1, const decimal_t *from2, decimal_t *to) |
| multiply two decimals | |
| static int | drizzled::do_div_mod (const decimal_t *from1, const decimal_t *from2, decimal_t *to, decimal_t *mod, int scale_incr) |
| int | drizzled::decimal_div (const decimal_t *from1, const decimal_t *from2, decimal_t *to, int scale_incr) |
| division of two decimals | |
| int | drizzled::decimal_mod (const decimal_t *from1, const decimal_t *from2, decimal_t *to) |
| modulus | |
| std::ostream & | drizzled::operator<< (std::ostream &output, const type::Decimal &dec) |
SQL standard-compliant decimal number handling.
Definition in file decimal.cc.
| #define sanity | ( | d | ) |
Definition at line 392 of file decimal.cc.