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


Public Member Functions | |
| Item_typecast (Item *a) | |
| String * | val_str (String *a) |
| void | fix_length_and_dec () |
| virtual const char * | cast_type () const =0 |
| void | print (String *str) |
Definition at line 699 of file item_timefunc.h.
| Item_typecast::Item_typecast | ( | Item * | a | ) | [inline] |
| virtual const char* Item_typecast::cast_type | ( | ) | const [pure virtual] |
Implemented in Item_char_typecast, Item_date_typecast, Item_time_typecast, and Item_datetime_typecast.
Referenced by print().
Here is the caller graph for this function:

| void Item_typecast::fix_length_and_dec | ( | ) | [inline, virtual] |
Implements Item_result_field.
Reimplemented in Item_typecast_maybe_null, Item_char_typecast, and Item_date_typecast.
Definition at line 712 of file item_timefunc.h.
References Item_func::args, Item::collation, Item::max_length, my_charset_bin, and DTCollation::set().
00713 { 00714 collation.set(&my_charset_bin); 00715 max_length=args[0]->max_length; 00716 }
Here is the call graph for this function:

| void Item_typecast::print | ( | String * | str | ) | [virtual] |
Reimplemented from Item_func.
Reimplemented in Item_char_typecast.
Definition at line 2200 of file item_timefunc.cc.
References String::append(), Item_func::args, cast_type(), Item::print(), and STRING_WITH_LEN.
02201 { 02202 str->append(STRING_WITH_LEN("cast(")); 02203 args[0]->print(str); 02204 str->append(STRING_WITH_LEN(" as ")); 02205 str->append(cast_type()); 02206 str->append(')'); 02207 }
Here is the call graph for this function:

Implements Item.
Reimplemented in Item_char_typecast, Item_date_typecast, Item_time_typecast, and Item_datetime_typecast.
Definition at line 703 of file item_timefunc.h.
References Item_func::args, DTCollation::collation, Item::collation, DBUG_ASSERT, Item::fixed, Item::null_value, String::set_charset(), and Item::val_str().
00704 { 00705 DBUG_ASSERT(fixed == 1); 00706 String *tmp=args[0]->val_str(a); 00707 null_value=args[0]->null_value; 00708 if (tmp) 00709 tmp->set_charset(collation.collation); 00710 return tmp; 00711 }
Here is the call graph for this function:

1.4.7

