My Project
Public Member Functions
Field_null Class Reference
Inheritance diagram for Field_null:
Field_str Field

List of all members.

Public Member Functions

 Field_null (uchar *ptr_arg, uint32 len_arg, enum utype unireg_check_arg, const char *field_name_arg, const CHARSET_INFO *cs)
enum_field_types type () const
type_conversion_status store (const char *to, uint length, const CHARSET_INFO *cs)
type_conversion_status store (double nr)
type_conversion_status store (longlong nr, bool unsigned_val)
type_conversion_status store_decimal (const my_decimal *d)
type_conversion_status reset (void)
double val_real (void)
longlong val_int (void)
my_decimalval_decimal (my_decimal *)
Stringval_str (String *value, String *value2)
int cmp (const uchar *a, const uchar *b)
void make_sort_key (uchar *buff, uint length)
uint32 pack_length () const
void sql_type (String &str) const
uint32 max_display_length ()
Field_nullclone (MEM_ROOT *mem_root) const
Field_nullclone () const

Member Function Documentation

Field_null* Field_null::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_null* Field_null::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.

void Field_null::make_sort_key ( uchar *  buff,
uint  length 
) [inline, 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.

type_conversion_status Field_null::store ( double  nr) [inline, 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.

type_conversion_status Field_null::store_decimal ( const my_decimal d) [inline, virtual]

Decimal representation of Field_str.

Parameters:
dvalue for storing
Note:
Field_str is the base class for fields implemeting [VAR]CHAR, VAR[BINARY], BLOB/TEXT, GEOMETRY. String value should be converted to floating point value according our rules, so we use double to store value of decimal in string.
Todo:
use decimal2string?
Return values:
0OK
!=0error

Reimplemented from Field_str.


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