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


Public Member Functions | |
| Item_func_weekday (Item *a, bool type_arg) | |
| longlong | val_int () |
| double | val_real () |
| String * | val_str (String *str) |
| const char * | func_name () const |
| enum Item_result | result_type () const |
| void | fix_length_and_dec () |
| bool | check_partition_func_processor (byte *bool_arg) |
Private Attributes | |
| bool | odbc_type |
Definition at line 264 of file item_timefunc.h.
| void Item_func_weekday::fix_length_and_dec | ( | ) | [inline, virtual] |
Implements Item_result_field.
Reimplemented in Item_func_dayname.
Definition at line 283 of file item_timefunc.h.
References Item::collation, Item::decimals, Item::max_length, Item::maybe_null, my_charset_bin, MY_CHARSET_BIN_MB_MAXLEN, and DTCollation::set().
00284 { 00285 collation.set(&my_charset_bin); 00286 decimals=0; 00287 max_length=1*MY_CHARSET_BIN_MB_MAXLEN; 00288 maybe_null=1; 00289 }
Here is the call graph for this function:

| const char* Item_func_weekday::func_name | ( | ) | const [inline, virtual] |
Implements Item_func.
Reimplemented in Item_func_dayname.
Definition at line 278 of file item_timefunc.h.
References odbc_type.
00279 { 00280 return (odbc_type ? "dayofweek" : "weekday"); 00281 }
| enum Item_result Item_func_weekday::result_type | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Reimplemented in Item_func_dayname.
Definition at line 282 of file item_timefunc.h.
References INT_RESULT.
00282 { return INT_RESULT; }
| longlong Item_func_weekday::val_int | ( | ) | [virtual] |
Implements Item.
Definition at line 996 of file item_timefunc.cc.
References calc_daynr(), calc_weekday(), st_mysql_time::day, DBUG_ASSERT, Item::fixed, Item_func::get_arg0_date(), st_mysql_time::month, odbc_type, test, TIME_NO_ZERO_DATE, and st_mysql_time::year.
Referenced by val_real(), val_str(), and Item_func_dayname::val_str().
00997 { 00998 DBUG_ASSERT(fixed == 1); 00999 TIME ltime; 01000 01001 if (get_arg0_date(<ime, TIME_NO_ZERO_DATE)) 01002 return 0; 01003 01004 return (longlong) calc_weekday(calc_daynr(ltime.year, ltime.month, 01005 ltime.day), 01006 odbc_type) + test(odbc_type); 01007 }
Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements Item.
Reimplemented in Item_func_dayname.
Definition at line 272 of file item_timefunc.h.
References DBUG_ASSERT, Item::fixed, my_charset_bin, Item::null_value, String::set(), and val_int().
00273 { 00274 DBUG_ASSERT(fixed == 1); 00275 str->set(val_int(), &my_charset_bin); 00276 return null_value ? 0 : str; 00277 }
Here is the call graph for this function:

bool Item_func_weekday::odbc_type [private] |
1.4.7

