drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::type Namespace Reference

Convert from decimal to binary representation. More...

Classes

class  Decimal
class  IPv6
class  Time
class  Uuid

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]maskerror processing mask
[in]dnumber for conversion
[out]binpointer to buffer where to write result
[in]precoverall number of decimal digits
[in]scalenumber 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

Typedef Documentation

◆ date_t

typedef int64_t drizzled::type::date_t

Definition at line 220 of file common_fwd.h.

◆ datetime_t

typedef int64_t drizzled::type::datetime_t

Definition at line 219 of file common_fwd.h.

◆ epoch_t

typedef int64_t drizzled::type::epoch_t

Definition at line 221 of file common_fwd.h.

◆ usec_t

typedef uint32_t drizzled::type::usec_t

Definition at line 222 of file common_fwd.h.

Enumeration Type Documentation

◆ cut_t

enum drizzled::type::cut_t

Definition at line 82 of file type/time.h.

◆ timestamp_t

enum drizzled::type::timestamp_t

Definition at line 76 of file type/time.h.

Function Documentation

◆ convert() [1/4]

bool drizzled::type::convert ( bool & destination,
const char * source,
const size_t source_length )

Definition at line 45 of file type/boolean.cc.

◆ convert() [2/4]

bool drizzled::type::convert ( bool & destination,
String & source )

Definition at line 104 of file type/boolean.cc.

◆ convert() [3/4]

const char * drizzled::type::convert ( bool source,
bool ansi_display )

Definition at line 30 of file type/boolean.cc.

◆ convert() [4/4]

void drizzled::type::convert ( String & destination,
bool source,
bool ansi_display )

Definition at line 37 of file type/boolean.cc.

◆ is_valid()

bool drizzled::type::is_valid ( datetime_t value)
inline

Definition at line 93 of file type/time.h.