My Project
|
Public Member Functions | |
Item_func_group_concat (Name_resolution_context *context_arg, bool is_distinct, List< Item > *is_select, const SQL_I_List< ORDER > &is_order, String *is_separator) | |
Item_func_group_concat (THD *thd, Item_func_group_concat *item) | |
void | cleanup () |
enum Sumfunctype | sum_func () const |
const char * | func_name () const |
virtual Item_result | result_type () const |
virtual Field * | make_string_field (TABLE *table) |
enum_field_types | field_type () const |
void | clear () |
bool | add () |
void | reset_field () |
void | update_field () |
bool | fix_fields (THD *, Item **) |
bool | setup (THD *thd) |
void | make_unique () |
double | val_real () |
longlong | val_int () |
my_decimal * | val_decimal (my_decimal *decimal_value) |
bool | get_date (MYSQL_TIME *ltime, uint fuzzydate) |
bool | get_time (MYSQL_TIME *ltime) |
String * | val_str (String *str) |
Item * | copy_or_same (THD *thd) |
void | no_rows_in_result () |
virtual void | print (String *str, enum_query_type query_type) |
virtual bool | change_context_processor (uchar *cntx) |
Friends | |
int | group_concat_key_cmp_with_distinct (const void *arg, const void *key1, const void *key2) |
int | group_concat_key_cmp_with_order (const void *arg, const void *key1, const void *key2) |
int | dump_leaf_key (void *key_arg, element_count count __attribute__((unused)), void *item_arg) |
Item_func_group_concat::Item_func_group_concat | ( | Name_resolution_context * | context_arg, |
bool | distinct_arg, | ||
List< Item > * | select_list, | ||
const SQL_I_List< ORDER > & | order_list, | ||
String * | separator_arg | ||
) |
Constructor of Item_func_group_concat.
distinct_arg | distinct |
select_list | list of expression for show values |
order_list | list of sort columns |
separator_arg | string value of separator. |
Field * Item_func_group_concat::make_string_field | ( | TABLE * | table | ) | [virtual] |
Create a field to hold a string value from an item.
If max_length > CONVERT_IF_BIGGER_TO_BLOB create a blob
If max_length > 0 create a varchar
If max_length == 0 create a CHAR(0) (or VARCHAR(0) if we are grouping)
table | Table for which the field is created |
Reimplemented from Item.
void Item_func_group_concat::no_rows_in_result | ( | ) | [inline, virtual] |
Mark an aggregate as having no rows.
This function is called by the execution engine to assign 'NO ROWS FOUND' value to an aggregate item, when the underlying result set has no rows. Such value, in a general case, may be different from the default value of the item after 'clear()': e.g. a numeric item may be initialized to 0 by clear() and to NULL by no_rows_in_result().
Reimplemented from Item_sum.
void Item_func_group_concat::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_sum.
bool Item_func_group_concat::setup | ( | THD * | thd | ) | [virtual] |
Initialize blob_storage if GROUP_CONCAT is used with ORDER BY | DISTINCT and BLOB field count > 0.
Reimplemented from Item_sum.
int dump_leaf_key | ( | void * | key_arg, |
element_count count | __attribute__(unused), | ||
void * | item_arg | ||
) | [friend] |
Append data from current leaf to item->result.
To avoid duplicated warnings in Item_func_group_concat::val_str()
int group_concat_key_cmp_with_distinct | ( | const void * | arg, |
const void * | key1, | ||
const void * | key2 | ||
) | [friend] |
Compares the values for fields in expr list of GROUP_CONCAT.
GROUP_CONCAT([DISTINCT] expr [,expr ...] [ORDER BY {unsigned_integer | col_name | expr} [ASC | DESC] [,col_name ...]] [SEPARATOR str_val])
-1 | : key1 < key2 |
0 | : key1 = key2 |
1 | : key1 > key2 |
int group_concat_key_cmp_with_order | ( | const void * | arg, |
const void * | key1, | ||
const void * | key2 | ||
) | [friend] |
function of sort for syntax: GROUP_CONCAT(expr,... ORDER BY col,... )