My Project
Public Member Functions
Field_decimal Class Reference
Inheritance diagram for Field_decimal:
Field_real Field_num Field

List of all members.

Public Member Functions

 Field_decimal (uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg)
enum_field_types type () const
enum ha_base_keytype key_type () const
type_conversion_status reset (void)
type_conversion_status store (const char *to, uint length, const CHARSET_INFO *charset)
type_conversion_status store (double nr)
type_conversion_status store (longlong nr, bool unsigned_val)
double val_real (void)
longlong val_int (void)
Stringval_str (String *, String *)
int cmp (const uchar *, const uchar *)
void make_sort_key (uchar *buff, uint length)
void overflow (bool negative)
bool zero_pack () const
void sql_type (String &str) const
Field_decimalclone (MEM_ROOT *mem_root) const
Field_decimalclone () const
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)

Member Function Documentation

Field_decimal* Field_decimal::clone ( MEM_ROOT *  mem_root) const [inline, virtual]

Makes a shallow copy of the Field object.

Note:
This member function must be overridden in all concrete subclasses. Several of the Field subclasses are concrete even though they are not leaf classes, so the compiler will not always catch this.
Parameters:
mem_rootMEM_ROOT to use for memory allocation.
Return values:
NULLIf memory allocation failed.

Implements Field.

Field_decimal* Field_decimal::clone ( ) const [inline, virtual]

Makes a shallow copy of the Field object.

Note:
This member function must be overridden in all concrete subclasses. Several of the Field subclasses are concrete even though they are not leaf classes, so the compiler will not always catch this.
Return values:
NULLIf memory allocation failed.

Implements Field.

int Field_decimal::cmp ( const uchar *  a_ptr,
const uchar *  b_ptr 
) [virtual]

Should be able to handle at least the following fixed decimal formats: 5.00 , -1.0, 05, -05, +5 with optional pre/end space

Implements Field.

void Field_decimal::make_sort_key ( uchar *  buff,
uint  length 
) [virtual]

Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comparison. Integers are always in big-endian regardless of hardware architecture. At most length bytes are written into the buffer.

Parameters:
buffThe buffer, assumed to be at least length bytes.
lengthNumber of bytes to write.

Implements Field.

virtual uchar* Field_decimal::pack ( uchar *  to,
const uchar *  from,
uint  max_length,
bool  low_byte_first 
) [inline, 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_real.

virtual const uchar* Field_decimal::unpack ( uchar *  to,
const uchar *  from,
uint  param_data,
bool  low_byte_first 
) [inline, 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_real.


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