My Project
Public Member Functions | Public Attributes | Protected Attributes
Field_enum Class Reference
Inheritance diagram for Field_enum:
Field_str Field Field_set

List of all members.

Public Member Functions

 Field_enum (uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, uint packlength_arg, TYPELIB *typelib_arg, const CHARSET_INFO *charset_arg)
Fieldnew_field (MEM_ROOT *root, TABLE *new_table, bool keep_type)
enum_field_types type () const
bool match_collation_to_optimize_range () const
enum Item_result cmp_type () const
enum Item_result cast_to_int_type () const
enum ha_base_keytype key_type () const
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)
my_decimalval_decimal (my_decimal *decimal_value)
longlong val_int (void)
Stringval_str (String *, String *)
int cmp (const uchar *, const uchar *)
void make_sort_key (uchar *buff, uint length)
uint32 pack_length () const
void store_type (ulonglong value)
void sql_type (String &str) const
enum_field_types real_type () const
uint pack_length_from_metadata (uint field_metadata)
uint row_pack_length () const
virtual bool zero_pack () const
bool optimize_range (uint idx, uint part)
bool eq_def (Field *field)
bool has_charset (void) const
CHARSET_INFO * sort_charset (void) const
Field_enumclone (MEM_ROOT *mem_root) const
Field_enumclone () const
virtual uchar * pack (uchar *to, const uchar *from, uint max_length, bool low_byte_first)
virtual const uchar * unpack (uchar *to, const uchar *from, uint param_data, bool low_byte_first)

Public Attributes

TYPELIB * typelib

Protected Attributes

uint packlength

Member Function Documentation

Field_enum* Field_enum::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.

Reimplemented in Field_set.

Field_enum* Field_enum::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.

Reimplemented in Field_set.

bool Field_enum::eq_def ( Field field) [virtual]
Returns:
returns 1 if the fields are equally defined

Reimplemented from Field.

void Field_enum::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.

uchar * Field_enum::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.

type_conversion_status Field_enum::store ( const char *  from,
uint  length,
const CHARSET_INFO *  cs 
) [virtual]
Note:
Storing a empty string in a enum field gives a warning (if there isn't a empty value in the enum)

Implements Field_str.

Reimplemented in Field_set.

type_conversion_status Field_enum::store ( double  nr) [virtual]

Store double value in Field_string or Field_varstring.

Pretty prints double number into field_length characters buffer.

Parameters:
nrnumber

Reimplemented from Field_str.

Reimplemented in Field_set.

const uchar * Field_enum::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.


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