My Project
Public Member Functions | Public Attributes
Field_real Class Reference
Inheritance diagram for Field_real:
Field_num Field Field_decimal Field_double Field_float

List of all members.

Public Member Functions

 Field_real (uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg)
type_conversion_status store_decimal (const my_decimal *)
type_conversion_status store_time (MYSQL_TIME *ltime, uint8 dec)
my_decimalval_decimal (my_decimal *)
bool get_date (MYSQL_TIME *ltime, uint fuzzydate)
bool get_time (MYSQL_TIME *ltime)
bool truncate (double *nr, double max_length)
uint32 max_display_length ()
virtual const uchar * unpack (uchar *to, const uchar *from, uint param_data, bool low_byte_first)
virtual uchar * pack (uchar *to, const uchar *from, uint max_length, bool low_byte_first)

Public Attributes

my_bool not_fixed

Member Function Documentation

uchar * Field_real::pack ( uchar *  to,
const uchar *  from,
uint  max_length,
bool  low_byte_first 
) [virtual]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented from Field.

Reimplemented in Field_decimal.

type_conversion_status Field_real::store_decimal ( const my_decimal val) [virtual]

Storing decimal in integer fields.

Parameters:
valvalue for storing
Note:
This method is used by all integer fields, real/decimal redefine it
Return values:
TYPE_OKStorage of value went fine without warnings or errors
!TYPE_OKWarning/error as indicated by type_conversion_status enum value

Reimplemented from Field_num.

type_conversion_status Field_real::store_time ( MYSQL_TIME *  ltime,
uint8  dec_arg 
) [virtual]

Store MYSQL_TIME value with the given amount of decimal digits into a field.

Note, the "dec" parameter represents number of digits of the Item that previously created the MYSQL_TIME value. It's needed when we store the value into a CHAR/VARCHAR/TEXT field to display the proper amount of fractional digits. For other field types the "dec" value does not matter and is ignored.

Parameters:
ltimeTime, date or datetime value.
decNumber of decimals in ltime.
Return values:
falseon success
trueon error

This is called when storing a date in a string.

Note:
Needs to be changed if/when we want to support different time formats.

Reimplemented from Field_num.

const uchar * Field_real::unpack ( uchar *  to,
const uchar *  from,
uint  param_data,
bool  low_byte_first 
) [virtual]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented from Field.

Reimplemented in Field_decimal.

my_decimal * Field_real::val_decimal ( my_decimal decimal_value) [virtual]

Return decimal value of integer field.

Parameters:
decimal_valuebuffer for storing decimal value
Note:
This method is used by all integer fields, real/decimal redefine it. All longlong values fit in our decimal buffer which cal store 8*9=72 digits of integer number
Returns:
pointer to decimal buffer with value of field

Reimplemented from Field_num.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines