1
by brian
clean slate |
1 |
/* Copyright (C) 2000 MySQL AB
|
2 |
||
3 |
This program is free software; you can redistribute it and/or modify
|
|
4 |
it under the terms of the GNU General Public License as published by
|
|
5 |
the Free Software Foundation; version 2 of the License.
|
|
6 |
||
7 |
This program is distributed in the hope that it will be useful,
|
|
8 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
9 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
10 |
GNU General Public License for more details.
|
|
11 |
||
12 |
You should have received a copy of the GNU General Public License
|
|
13 |
along with this program; if not, write to the Free Software
|
|
14 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
15 |
||
16 |
class Item_row: public Item |
|
17 |
{
|
|
18 |
Item **items; |
|
19 |
table_map used_tables_cache; |
|
20 |
uint arg_count; |
|
21 |
bool const_item_cache; |
|
22 |
bool with_null; |
|
23 |
public: |
|
24 |
Item_row(List<Item> &); |
|
25 |
Item_row(Item_row *item): |
|
26 |
Item(), |
|
27 |
items(item->items), |
|
28 |
used_tables_cache(item->used_tables_cache), |
|
29 |
arg_count(item->arg_count), |
|
30 |
const_item_cache(item->const_item_cache), |
|
31 |
with_null(0) |
|
32 |
{}
|
|
33 |
||
34 |
enum Type type() const { return ROW_ITEM; }; |
|
35 |
void illegal_method_call(const char *); |
|
36 |
bool is_null() { return null_value; } |
|
37 |
void make_field(Send_field *) |
|
38 |
{
|
|
39 |
illegal_method_call((const char*)"make_field"); |
|
40 |
};
|
|
41 |
double val_real() |
|
42 |
{
|
|
43 |
illegal_method_call((const char*)"val"); |
|
44 |
return 0; |
|
45 |
};
|
|
152
by Brian Aker
longlong replacement |
46 |
int64_t val_int() |
1
by brian
clean slate |
47 |
{
|
48 |
illegal_method_call((const char*)"val_int"); |
|
49 |
return 0; |
|
50 |
};
|
|
51 |
String *val_str(String *) |
|
52 |
{
|
|
53 |
illegal_method_call((const char*)"val_str"); |
|
54 |
return 0; |
|
55 |
};
|
|
56 |
my_decimal *val_decimal(my_decimal *) |
|
57 |
{
|
|
58 |
illegal_method_call((const char*)"val_decimal"); |
|
59 |
return 0; |
|
60 |
};
|
|
61 |
bool fix_fields(THD *thd, Item **ref); |
|
62 |
void fix_after_pullout(st_select_lex *new_parent, Item **ref); |
|
63 |
void cleanup(); |
|
64 |
void split_sum_func(THD *thd, Item **ref_pointer_array, List<Item> &fields); |
|
65 |
table_map used_tables() const { return used_tables_cache; }; |
|
66 |
bool const_item() const { return const_item_cache; }; |
|
67 |
enum Item_result result_type() const { return ROW_RESULT; } |
|
68 |
void update_used_tables(); |
|
69 |
virtual void print(String *str, enum_query_type query_type); |
|
70 |
||
71 |
bool walk(Item_processor processor, bool walk_subquery, uchar *arg); |
|
72 |
Item *transform(Item_transformer transformer, uchar *arg); |
|
73 |
||
74 |
uint cols() { return arg_count; } |
|
75 |
Item* element_index(uint i) { return items[i]; } |
|
76 |
Item** addr(uint i) { return items + i; } |
|
77 |
bool check_cols(uint c); |
|
78 |
bool null_inside() { return with_null; }; |
|
79 |
void bring_value(); |
|
80 |
};
|