My Project
Public Member Functions
Field_year Class Reference
Inheritance diagram for Field_year:
Field_tiny Field_num Field

List of all members.

Public Member Functions

 Field_year (uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg)
enum_field_types 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 store_time (MYSQL_TIME *ltime, uint8 dec)
double val_real (void)
longlong val_int (void)
Stringval_str (String *, String *)
bool send_binary (Protocol *protocol)
void sql_type (String &str) const
bool can_be_compared_as_longlong () const
Field_yearclone (MEM_ROOT *mem_root) const
Field_yearclone () const

Member Function Documentation

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

Reimplemented from Field_tiny.

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

Reimplemented from Field_tiny.

type_conversion_status Field_year::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.


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