~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
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
20
#ifndef DRIZZLED_ITEM_ROW_H
21
#define DRIZZLED_ITEM_ROW_H
22
1 by brian
clean slate
23
class Item_row: public Item
24
{
25
  Item **items;
26
  table_map used_tables_cache;
482 by Brian Aker
Remove uint.
27
  uint32_t arg_count;
1 by brian
clean slate
28
  bool const_item_cache;
29
  bool with_null;
30
public:
31
  Item_row(List<Item> &);
32
  Item_row(Item_row *item):
33
    Item(),
34
    items(item->items),
35
    used_tables_cache(item->used_tables_cache),
36
    arg_count(item->arg_count),
37
    const_item_cache(item->const_item_cache),
38
    with_null(0)
39
  {}
40
41
  enum Type type() const { return ROW_ITEM; };
42
  void illegal_method_call(const char *);
43
  bool is_null() { return null_value; }
44
  void make_field(Send_field *)
45
  {
46
    illegal_method_call((const char*)"make_field");
47
  };
48
  double val_real()
49
  {
50
    illegal_method_call((const char*)"val");
51
    return 0;
52
  };
152 by Brian Aker
longlong replacement
53
  int64_t val_int()
1 by brian
clean slate
54
  {
55
    illegal_method_call((const char*)"val_int");
56
    return 0;
57
  };
58
  String *val_str(String *)
59
  {
60
    illegal_method_call((const char*)"val_str");
61
    return 0;
62
  };
63
  my_decimal *val_decimal(my_decimal *)
64
  {
65
    illegal_method_call((const char*)"val_decimal");
66
    return 0;
67
  };
520.1.22 by Brian Aker
Second pass of thd cleanup
68
  bool fix_fields(Session *session, Item **ref);
1 by brian
clean slate
69
  void fix_after_pullout(st_select_lex *new_parent, Item **ref);
70
  void cleanup();
520.1.22 by Brian Aker
Second pass of thd cleanup
71
  void split_sum_func(Session *session, Item **ref_pointer_array, List<Item> &fields);
1 by brian
clean slate
72
  table_map used_tables() const { return used_tables_cache; };
73
  bool const_item() const { return const_item_cache; };
74
  enum Item_result result_type() const { return ROW_RESULT; }
75
  void update_used_tables();
76
  virtual void print(String *str, enum_query_type query_type);
77
481 by Brian Aker
Remove all of uchar.
78
  bool walk(Item_processor processor, bool walk_subquery, unsigned char *arg);
79
  Item *transform(Item_transformer transformer, unsigned char *arg);
1 by brian
clean slate
80
482 by Brian Aker
Remove uint.
81
  uint32_t cols() { return arg_count; }
82
  Item* element_index(uint32_t i) { return items[i]; }
83
  Item** addr(uint32_t i) { return items + i; }
84
  bool check_cols(uint32_t c);
1 by brian
clean slate
85
  bool null_inside() { return with_null; };
86
  void bring_value();
646 by Brian Aker
Next pass through attribute.
87
  bool check_vcol_func_processor(unsigned char *)
383.7.1 by Andrey Zhakov
Initial submit of code and tests
88
  { return false; }
1 by brian
clean slate
89
};
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
90
91
#endif /* DRIZZLED_ITEM_ROW_H */