My Project
Public Member Functions | Static Public Attributes
Field_long Class Reference
Inheritance diagram for Field_long:
Field_num Field

List of all members.

Public Member Functions

 Field_long (uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, bool zero_arg, bool unsigned_arg)
 Field_long (uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, bool unsigned_arg)
enum Item_result result_type () const
enum_field_types 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)
type_conversion_status reset (void)
double val_real (void)
longlong val_int (void)
bool send_binary (Protocol *protocol)
Stringval_str (String *, String *)
int cmp (const uchar *, const uchar *)
void make_sort_key (uchar *buff, uint length)
uint32 pack_length () const
void sql_type (String &str) const
uint32 max_display_length ()
Field_longclone (MEM_ROOT *mem_root) const
Field_longclone () const
virtual uchar * pack (uchar *to, const uchar *from, uint max_length __attribute__((unused)), bool low_byte_first)
virtual const uchar * unpack (uchar *to, const uchar *from, uint param_data __attribute__((unused)), bool low_byte_first)

Static Public Attributes

static const int PACK_LENGTH = 4

Member Function Documentation

Field_long* Field_long::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_long* Field_long::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_long::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.

type_conversion_status Field_long::store ( longlong  nr,
bool  unsigned_val 
) [virtual]

Store a longlong in the field

Parameters:
nrthe value to store
unsigned_valwhether or not 'nr' should be interpreted as signed or unsigned. E.g., if 'nr' has all bits set it is interpreted as -1 if unsigned_val is false and ULONGLONG_MAX if unsigned_val is true.

Implements Field.


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