Convert from decimal to binary representation.
More...
Typedefs |
typedef int64_t | datetime_t |
typedef int64_t | date_t |
typedef int64_t | epoch_t |
typedef uint32_t | usec_t |
Enumerations |
enum | timestamp_t {
DRIZZLE_TIMESTAMP_NONE = -2,
DRIZZLE_TIMESTAMP_ERROR = -1,
DRIZZLE_TIMESTAMP_DATE = 0,
DRIZZLE_TIMESTAMP_DATETIME = 1,
DRIZZLE_TIMESTAMP_TIME = 2
} |
enum | cut_t { VALID = 0,
CUT = 1,
INVALID = 2
} |
Functions |
const char * | convert (bool source, bool ansi_display) |
void | convert (String &destination, bool source, bool ansi_display) |
bool | convert (bool &destination, const char *source, const size_t source_length) |
bool | convert (bool &destination, String &source) |
bool | is_valid (datetime_t value) |
Detailed Description
Convert from decimal to binary representation.
- Parameters:
-
[in] | mask | error processing mask |
[in] | d | number for conversion |
[out] | bin | pointer to buffer where to write result |
[in] | prec | overall number of decimal digits |
[in] | scale | number of decimal digits after decimal point |
- Note:
- Before conversion we round number if it need but produce truncation error in this case
- Returns:
- error code
- Return values:
-
E_DEC_OK | |
E_DEC_TRUNCATED | |
E_DEC_OVERFLOW | |