~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2008 Sun Microsystems
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; version 2 of the License.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 */
1 by brian
clean slate
19
20
class Item_row: public Item
21
{
22
  Item **items;
23
  table_map used_tables_cache;
482 by Brian Aker
Remove uint.
24
  uint32_t arg_count;
1 by brian
clean slate
25
  bool const_item_cache;
26
  bool with_null;
27
public:
28
  Item_row(List<Item> &);
29
  Item_row(Item_row *item):
30
    Item(),
31
    items(item->items),
32
    used_tables_cache(item->used_tables_cache),
33
    arg_count(item->arg_count),
34
    const_item_cache(item->const_item_cache),
35
    with_null(0)
36
  {}
37
38
  enum Type type() const { return ROW_ITEM; };
39
  void illegal_method_call(const char *);
40
  bool is_null() { return null_value; }
41
  void make_field(Send_field *)
42
  {
43
    illegal_method_call((const char*)"make_field");
44
  };
45
  double val_real()
46
  {
47
    illegal_method_call((const char*)"val");
48
    return 0;
49
  };
152 by Brian Aker
longlong replacement
50
  int64_t val_int()
1 by brian
clean slate
51
  {
52
    illegal_method_call((const char*)"val_int");
53
    return 0;
54
  };
55
  String *val_str(String *)
56
  {
57
    illegal_method_call((const char*)"val_str");
58
    return 0;
59
  };
60
  my_decimal *val_decimal(my_decimal *)
61
  {
62
    illegal_method_call((const char*)"val_decimal");
63
    return 0;
64
  };
520.1.22 by Brian Aker
Second pass of thd cleanup
65
  bool fix_fields(Session *session, Item **ref);
1 by brian
clean slate
66
  void fix_after_pullout(st_select_lex *new_parent, Item **ref);
67
  void cleanup();
520.1.22 by Brian Aker
Second pass of thd cleanup
68
  void split_sum_func(Session *session, Item **ref_pointer_array, List<Item> &fields);
1 by brian
clean slate
69
  table_map used_tables() const { return used_tables_cache; };
70
  bool const_item() const { return const_item_cache; };
71
  enum Item_result result_type() const { return ROW_RESULT; }
72
  void update_used_tables();
73
  virtual void print(String *str, enum_query_type query_type);
74
481 by Brian Aker
Remove all of uchar.
75
  bool walk(Item_processor processor, bool walk_subquery, unsigned char *arg);
76
  Item *transform(Item_transformer transformer, unsigned char *arg);
1 by brian
clean slate
77
482 by Brian Aker
Remove uint.
78
  uint32_t cols() { return arg_count; }
79
  Item* element_index(uint32_t i) { return items[i]; }
80
  Item** addr(uint32_t i) { return items + i; }
81
  bool check_cols(uint32_t c);
1 by brian
clean slate
82
  bool null_inside() { return with_null; };
83
  void bring_value();
481.3.1 by Monty Taylor
Merged vcol stuff.
84
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
383.7.1 by Andrey Zhakov
Initial submit of code and tests
85
  { return false; }
1 by brian
clean slate
86
};