The world's most popular open source database
#include <item_timefunc.h>
Inheritance diagram for Item_date_typecast:


Public Member Functions | |
| Item_date_typecast (Item *a) | |
| const char * | func_name () const |
| String * | val_str (String *str) |
| bool | get_date (TIME *ltime, uint fuzzy_date) |
| const char * | cast_type () const |
| enum_field_types | field_type () const |
| Field * | tmp_table_field (TABLE *table) |
| void | fix_length_and_dec () |
| bool | result_as_longlong () |
| longlong | val_int () |
Definition at line 756 of file item_timefunc.h.
| Item_date_typecast::Item_date_typecast | ( | Item * | a | ) | [inline] |
| const char* Item_date_typecast::cast_type | ( | ) | const [inline, virtual] |
| enum_field_types Item_date_typecast::field_type | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 764 of file item_timefunc.h.
References MYSQL_TYPE_DATE.
00764 { return MYSQL_TYPE_DATE; }
| void Item_date_typecast::fix_length_and_dec | ( | ) | [inline, virtual] |
Reimplemented from Item_typecast_maybe_null.
Definition at line 769 of file item_timefunc.h.
References Item::collation, Item::max_length, Item::maybe_null, my_charset_bin, and DTCollation::set().
00770 { 00771 collation.set(&my_charset_bin); 00772 max_length= 10; 00773 maybe_null= 1; 00774 }
Here is the call graph for this function:

| const char* Item_date_typecast::func_name | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 2414 of file item_timefunc.cc.
References Item_func::get_arg0_date(), st_mysql_time::hour, st_mysql_time::minute, MYSQL_TIMESTAMP_DATE, st_mysql_time::second, st_mysql_time::second_part, TIME_FUZZY_DATE, and st_mysql_time::time_type.
Referenced by val_int().
02415 { 02416 bool res= get_arg0_date(ltime, TIME_FUZZY_DATE); 02417 ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0; 02418 ltime->time_type= MYSQL_TIMESTAMP_DATE; 02419 return res; 02420 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool Item_date_typecast::result_as_longlong | ( | ) | [inline, virtual] |
Reimplemented from Item.
Definition at line 775 of file item_timefunc.h.
References TRUE.
00775 { return TRUE; }
Reimplemented from Item_func.
Definition at line 765 of file item_timefunc.h.
References Item::tmp_table_field_from_field_type().
00766 { 00767 return tmp_table_field_from_field_type(table, 0); 00768 }
Here is the call graph for this function:

| longlong Item_date_typecast::val_int | ( | ) | [virtual] |
Reimplemented from Item_str_func.
Definition at line 2438 of file item_timefunc.cc.
References Item_func::args, st_mysql_time::day, DBUG_ASSERT, Item::fixed, get_date(), st_mysql_time::month, TIME_FUZZY_DATE, and st_mysql_time::year.
02439 { 02440 DBUG_ASSERT(fixed == 1); 02441 TIME ltime; 02442 if (args[0]->get_date(<ime, TIME_FUZZY_DATE)) 02443 return 0; 02444 return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day); 02445 }
Here is the call graph for this function:

Reimplemented from Item_typecast.
Definition at line 2423 of file item_timefunc.cc.
References String::alloc(), DBUG_ASSERT, Item::fixed, Item_func::get_arg0_date(), make_date(), Item::null_value, and TIME_FUZZY_DATE.
02424 { 02425 DBUG_ASSERT(fixed == 1); 02426 TIME ltime; 02427 02428 if (!get_arg0_date(<ime, TIME_FUZZY_DATE) && !str->alloc(11)) 02429 { 02430 make_date((DATE_TIME_FORMAT *) 0, <ime, str); 02431 return str; 02432 } 02433 02434 null_value=1; 02435 return 0; 02436 }
Here is the call graph for this function:

1.4.7

