#include <item_timefunc.h>
Inheritance diagram for Item_date:


Public Member Functions | |
| Item_date () | |
| Item_date (Item *a) | |
| enum Item_result | result_type () const |
| enum_field_types | field_type () const |
| String * | val_str (String *str) |
| longlong | val_int () |
| double | val_real () |
| const char * | func_name () const |
| void | fix_length_and_dec () |
| int | save_in_field (Field *to, bool no_conversions) |
| Field * | tmp_table_field (TABLE *table) |
| bool | result_as_longlong () |
Definition at line 346 of file item_timefunc.h.
| Item_date::Item_date | ( | ) | [inline] |
| Item_date::Item_date | ( | Item * | a | ) | [inline] |
| enum_field_types Item_date::field_type | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 352 of file item_timefunc.h.
References MYSQL_TYPE_DATE.
00352 { return MYSQL_TYPE_DATE; }
| void Item_date::fix_length_and_dec | ( | ) | [inline, virtual] |
Implements Item_result_field.
Reimplemented in Item_func_curdate.
Definition at line 357 of file item_timefunc.h.
References Item::collation, Item::decimals, MAX_DATE_WIDTH, Item::max_length, my_charset_bin, MY_CHARSET_BIN_MB_MAXLEN, and DTCollation::set().
00358 { 00359 collation.set(&my_charset_bin); 00360 decimals=0; 00361 max_length=MAX_DATE_WIDTH*MY_CHARSET_BIN_MB_MAXLEN; 00362 }
Here is the call graph for this function:

| const char* Item_date::func_name | ( | ) | const [inline, virtual] |
Implements Item_func.
Reimplemented in Item_func_curdate_local, Item_func_curdate_utc, Item_func_from_days, and Item_func_last_day.
Definition at line 356 of file item_timefunc.h.
| bool Item_date::result_as_longlong | ( | ) | [inline, virtual] |
Reimplemented from Item.
Definition at line 368 of file item_timefunc.h.
References TRUE.
00368 { return TRUE; }
| enum Item_result Item_date::result_type | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 351 of file item_timefunc.h.
References STRING_RESULT.
00351 { return STRING_RESULT; }
Reimplemented from Item.
Definition at line 1273 of file item_timefunc.cc.
References Item::get_date(), MYSQL_TIMESTAMP_DATE, set_field_to_null(), and TIME_FUZZY_DATE.
01274 { 01275 TIME ltime; 01276 if (get_date(<ime, TIME_FUZZY_DATE)) 01277 return set_field_to_null(field); 01278 field->set_notnull(); 01279 field->store_time(<ime, MYSQL_TIMESTAMP_DATE); 01280 return 0; 01281 }
Here is the call graph for this function:

Reimplemented from Item_func.
Definition at line 364 of file item_timefunc.h.
References Item::tmp_table_field_from_field_type().
00365 { 00366 return tmp_table_field_from_field_type(table, 0); 00367 }
Here is the call graph for this function:

| longlong Item_date::val_int | ( | ) | [virtual] |
Implements Item.
Reimplemented in Item_func_curdate.
Definition at line 1284 of file item_timefunc.cc.
References st_mysql_time::day, DBUG_ASSERT, Item::fixed, Item::get_date(), st_mysql_time::month, TIME_FUZZY_DATE, and st_mysql_time::year.
Referenced by val_real().
01285 { 01286 DBUG_ASSERT(fixed == 1); 01287 TIME ltime; 01288 if (get_date(<ime, TIME_FUZZY_DATE)) 01289 return 0; 01290 return (longlong) (ltime.year*10000L+ltime.month*100+ltime.day); 01291 }
Here is the call graph for this function:

Here is the caller graph for this function:

| double Item_date::val_real | ( | void | ) | [inline, virtual] |
Implements Item.
Definition at line 355 of file item_timefunc.h.
References DBUG_ASSERT, Item::fixed, and val_int().
00355 { DBUG_ASSERT(fixed == 1); return (double) val_int(); }
Here is the call graph for this function:

Implements Item.
Reimplemented in Item_func_curdate.
Definition at line 1257 of file item_timefunc.cc.
References String::alloc(), DBUG_ASSERT, Item::fixed, Item::get_date(), make_date(), Item::null_value, and TIME_FUZZY_DATE.
01258 { 01259 DBUG_ASSERT(fixed == 1); 01260 TIME ltime; 01261 if (get_date(<ime, TIME_FUZZY_DATE)) 01262 return (String *) 0; 01263 if (str->alloc(11)) 01264 { 01265 null_value= 1; 01266 return (String *) 0; 01267 } 01268 make_date((DATE_TIME_FORMAT *) 0, <ime, str); 01269 return str; 01270 }
Here is the call graph for this function:

1.4.7

