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


Public Member Functions | |
| Item_copy_string (Item *i) | |
| enum Type | type () const |
| enum Item_result | result_type () const |
| enum_field_types | field_type () const |
| double | val_real () |
| longlong | val_int () |
| String * | val_str (String *) |
| my_decimal * | val_decimal (my_decimal *) |
| void | make_field (Send_field *field) |
| void | copy () |
| int | save_in_field (Field *field, bool no_conversions) |
| table_map | used_tables () const |
| bool | const_item () const |
| bool | is_null () |
Public Attributes | |
| Item * | item |
Private Attributes | |
| enum enum_field_types | cached_field_type |
Definition at line 2070 of file item.h.
| Item_copy_string::Item_copy_string | ( | Item * | i | ) | [inline] |
Definition at line 2075 of file item.h.
References cached_field_type, Item::decimals, Item::field_type(), item, Item::max_length, Item::maybe_null, Item::name, and Item::null_value.
02075 :item(i) 02076 { 02077 null_value=maybe_null=item->maybe_null; 02078 decimals=item->decimals; 02079 max_length=item->max_length; 02080 name=item->name; 02081 cached_field_type= item->field_type(); 02082 }
Here is the call graph for this function:

| bool Item_copy_string::const_item | ( | ) | const [inline, virtual] |
| void Item_copy_string::copy | ( | ) |
Definition at line 2881 of file item.cc.
References String::copy(), item, Item::null_value, Item::str_value, and Item::val_str().
02882 { 02883 String *res=item->val_str(&str_value); 02884 if (res && res != &str_value) 02885 str_value.copy(*res); 02886 null_value=item->null_value; 02887 }
Here is the call graph for this function:

| enum_field_types Item_copy_string::field_type | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 2085 of file item.h.
References cached_field_type.
02085 { return cached_field_type; }
| bool Item_copy_string::is_null | ( | ) | [inline, virtual] |
Reimplemented from Item.
Definition at line 2108 of file item.h.
References Item::null_value.
02108 { return null_value; }
| void Item_copy_string::make_field | ( | Send_field * | field | ) | [inline, virtual] |
Reimplemented from Item.
Definition at line 2103 of file item.h.
References item, and Item::make_field().
02103 { item->make_field(field); }
Here is the call graph for this function:

| enum Item_result Item_copy_string::result_type | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 2084 of file item.h.
References STRING_RESULT.
02084 { return STRING_RESULT; }
Reimplemented from Item.
Definition at line 2910 of file item.cc.
References DTCollation::collation, Item::collation, String::length(), Item::null_value, String::ptr(), set_field_to_null(), and Item::str_value.
02911 { 02912 if (null_value) 02913 return set_field_to_null(field); 02914 field->set_notnull(); 02915 return field->store(str_value.ptr(),str_value.length(), 02916 collation.collation); 02917 }
Here is the call graph for this function:

| enum Type Item_copy_string::type | ( | ) | const [inline, virtual] |
Implements Item.
Definition at line 2083 of file item.h.
References Item::COPY_STR_ITEM.
02083 { return COPY_STR_ITEM; }
| table_map Item_copy_string::used_tables | ( | ) | const [inline, virtual] |
| my_decimal * Item_copy_string::val_decimal | ( | my_decimal * | ) | [virtual] |
Implements Item.
Definition at line 2899 of file item.cc.
References E_DEC_FATAL_ERROR, Item::null_value, and Item::str_value.
02900 { 02901 // Item_copy_string is used without fix_fields call 02902 if (null_value) 02903 return 0; 02904 string2my_decimal(E_DEC_FATAL_ERROR, &str_value, decimal_value); 02905 return (decimal_value); 02906 }
| longlong Item_copy_string::val_int | ( | void | ) | [inline, virtual] |
Implements Item.
Definition at line 2094 of file item.h.
References String::charset(), err, String::length(), LL, my_strntoll, Item::null_value, String::ptr(), and Item::str_value.
02095 { 02096 int err; 02097 return null_value ? LL(0) : my_strntoll(str_value.charset(),str_value.ptr(), 02098 str_value.length(),10, (char**) 0, 02099 &err); 02100 }
Here is the call graph for this function:

| double Item_copy_string::val_real | ( | void | ) | [inline, virtual] |
Implements Item.
Definition at line 2086 of file item.h.
References String::charset(), String::length(), my_strntod, Item::null_value, String::ptr(), and Item::str_value.
02087 { 02088 int err_not_used; 02089 char *end_not_used; 02090 return (null_value ? 0.0 : 02091 my_strntod(str_value.charset(), (char*) str_value.ptr(), 02092 str_value.length(), &end_not_used, &err_not_used)); 02093 }
Here is the call graph for this function:

Implements Item.
Definition at line 2890 of file item.cc.
References Item::null_value, and Item::str_value.
02891 { 02892 // Item_copy_string is used without fix_fields call 02893 if (null_value) 02894 return (String*) 0; 02895 return &str_value; 02896 }
enum enum_field_types Item_copy_string::cached_field_type [private] |
1.4.7

