My Project
|
Public Member Functions | |
Item_cond (Item *i1, Item *i2) | |
Item_cond (THD *thd, Item_cond *item) | |
Item_cond (List< Item > &nlist) | |
bool | add (Item *item) |
bool | add_at_head (Item *item) |
void | add_at_head (List< Item > *nlist) |
bool | fix_fields (THD *, Item **ref) |
void | fix_after_pullout (st_select_lex *parent_select, st_select_lex *removed_select) |
enum Type | type () const |
List< Item > * | argument_list () |
table_map | used_tables () const |
void | update_used_tables () |
virtual void | print (String *str, enum_query_type query_type) |
void | split_sum_func (THD *thd, Ref_ptr_array ref_pointer_array, List< Item > &fields) |
void | top_level_item () |
void | copy_andor_arguments (THD *thd, Item_cond *item, bool real_items=false) |
bool | walk (Item_processor processor, bool walk_subquery, uchar *arg) |
Item * | transform (Item_transformer transformer, uchar *arg) |
void | traverse_cond (Cond_traverser, void *arg, traverse_order order) |
void | neg_arguments (THD *thd) |
enum_field_types | field_type () const |
bool | subst_argument_checker (uchar **arg) |
Item * | compile (Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t) |
virtual bool | equality_substitution_analyzer (uchar **arg) |
Protected Attributes | |
List< Item > | list |
bool | abort_on_null |
Friends | |
int | setup_conds (THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, Item **conds) |
Item * Item_cond::compile | ( | Item_analyzer | analyzer, |
uchar ** | arg_p, | ||
Item_transformer | transformer, | ||
uchar * | arg_t | ||
) | [virtual] |
Compile Item_cond object with a processor and a transformer callback functions.
First the function applies the analyzer to the root node of the Item_func object. Then if the analyzer succeeeds (returns TRUE) the function recursively applies the compile method to member item of the condition list. If the call of the method for a member item returns a new item the old item is substituted for a new one. After this the transformer is applied to the root node of the Item_cond object.
analyzer | the analyzer callback function to be applied to the nodes of the tree of the object | |
[in,out] | arg_p | parameter to be passed to the analyzer |
transformer | the transformer callback function to be applied to the nodes of the tree of the object | |
arg_t | parameter to be passed to the transformer |
Reimplemented from Item_func.
void Item_cond::fix_after_pullout | ( | st_select_lex * | parent_select, |
st_select_lex * | removed_select | ||
) | [virtual] |
Fix after tables have been moved from one select_lex level to the parent level, e.g by semijoin conversion. Basically re-calculate all attributes dependent on the tables.
parent_select | select_lex that tables are moved to. |
removed_select | select_lex that tables are moved away from, child of parent_select. |
Reimplemented from Item_func.
void Item_cond::print | ( | String * | str, |
enum_query_type | query_type | ||
) | [virtual] |
This method is used for to:
For more information about view definition query, INFORMATION_SCHEMA query and why they should be generated from the Item-tree,
Reimplemented from Item_func.
void Item_cond::split_sum_func | ( | THD * | thd, |
Ref_ptr_array | ref_pointer_array, | ||
List< Item > & | fields | ||
) | [virtual] |
Move SUM items out from item tree and replace with reference.
The split is done to get an unique item for each SUM function so that we can easily find and calculate them. (Calculation done by update_sum_func() and copy_sum_funcs() in sql_select.cc)
thd | Thread handler |
ref_pointer_array | Pointer to array of reference fields |
fields | All fields in select |
Reimplemented from Item_func.
Item * Item_cond::transform | ( | Item_transformer | transformer, |
uchar * | arg | ||
) | [virtual] |
Transform an Item_cond object with a transformer callback function.
The function recursively applies the transform method to each member item of the condition list. If the call of the method for a member item returns a new item the old item is substituted for a new one. After this the transformer is applied to the root node of the Item_cond object.
transformer | the transformer callback function to be applied to the nodes of the tree of the object |
arg | parameter to be passed to the transformer |
Reimplemented from Item_func.