My Project
Public Member Functions | Protected Member Functions
Field_timef Class Reference
Inheritance diagram for Field_timef:
Field_time_common Field_temporal Field

List of all members.

Public Member Functions

 Field_timef (uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg)
 Field_timef (bool maybe_null_arg, const char *field_name_arg, uint8 dec_arg)
Field_timefclone (MEM_ROOT *mem_root) const
Field_timefclone () const
uint decimals () const
enum_field_types type () const
enum_field_types real_type () const
enum_field_types binlog_type () const
type_conversion_status store_packed (longlong nr)
type_conversion_status reset ()
double val_real ()
longlong val_int ()
longlong val_time_temporal ()
bool get_time (MYSQL_TIME *ltime)
my_decimalval_decimal (my_decimal *)
uint32 pack_length () const
virtual uint pack_length_from_metadata (uint field_metadata)
uint row_pack_length () const
void sql_type (String &str) const
bool zero_pack () const
const CHARSET_INFO * sort_charset (void) const
void make_sort_key (uchar *to, uint length)
int cmp (const uchar *a_ptr, const uchar *b_ptr)

Protected Member Functions

type_conversion_status store_internal (const MYSQL_TIME *ltime, int *error)

Constructor & Destructor Documentation

Field_timef::Field_timef ( uchar *  ptr_arg,
uchar *  null_ptr_arg,
uchar  null_bit_arg,
enum utype  unireg_check_arg,
const char *  field_name_arg,
uint8  dec_arg 
) [inline]

Constructor for Field_timef

Parameters:
ptr_argSee Field definition
null_ptr_argSee Field definition
null_bit_argSee Field definition
unireg_check_argSee Field definition
field_name_argSee Field definition
dec_argNumber of second fraction digits, 0..6.
Field_timef::Field_timef ( bool  maybe_null_arg,
const char *  field_name_arg,
uint8  dec_arg 
) [inline]

Constructor for Field_timef

Parameters:
maybe_null_argSee Field definition
field_name_argSee Field definition
dec_argNumber of second fraction digits, 0..6.

Member Function Documentation

Field_timef* Field_timef::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_timef* Field_timef::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_timef::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_timef::store_internal ( const MYSQL_TIME *  ltime,
int *  error 
) [protected, virtual]

Low-level function to store MYSQL_TIME value. The value must be rounded or truncated according to decimals().

Implements Field_time_common.

type_conversion_status Field_timef::store_packed ( longlong  nr) [virtual]

Store a temporal value in packed longlong format into a field. The packed value is compatible with TIME_to_longlong_time_packed(), TIME_to_longlong_date_packed() or TIME_to_longlong_datetime_packed(). Note, the value must be properly rounded or truncated according according to field->decimals().

Parameters:
nrtemporal value in packed longlong format.
Return values:
falseon success
trueon error

Reimplemented from Field.

longlong Field_timef::val_time_temporal ( ) [virtual]

Returns TIME value in packed longlong format. This method should not be called for non-temporal types. Temporal field types override the default method.

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