~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
1237.9.3 by Padraig O'Sullivan
Removed one the includes I put in server_includes.h for the last commit to get rid of the inclusion
23
#include "drizzled/item.h"
24
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
25
namespace drizzled
26
{
27
1 by brian
clean slate
28
class Item_row: public Item
29
{
30
  Item **items;
31
  table_map used_tables_cache;
482 by Brian Aker
Remove uint.
32
  uint32_t arg_count;
1 by brian
clean slate
33
  bool const_item_cache;
34
  bool with_null;
35
public:
779.3.18 by Monty Taylor
Cleaned up warnings up through innodb.
36
37
  using Item::split_sum_func;
38
1 by brian
clean slate
39
  Item_row(List<Item> &);
40
  Item_row(Item_row *item):
41
    Item(),
42
    items(item->items),
43
    used_tables_cache(item->used_tables_cache),
44
    arg_count(item->arg_count),
45
    const_item_cache(item->const_item_cache),
46
    with_null(0)
47
  {}
48
49
  enum Type type() const { return ROW_ITEM; };
50
  void illegal_method_call(const char *);
51
  bool is_null() { return null_value; }
1052.2.4 by Nathan Williams
No actual code changes. Changed Send_field to SendField to be consistent with coding standards.
52
  void make_field(SendField *)
1 by brian
clean slate
53
  {
54
    illegal_method_call((const char*)"make_field");
55
  };
56
  double val_real()
57
  {
58
    illegal_method_call((const char*)"val");
59
    return 0;
60
  };
152 by Brian Aker
longlong replacement
61
  int64_t val_int()
1 by brian
clean slate
62
  {
63
    illegal_method_call((const char*)"val_int");
64
    return 0;
65
  };
66
  String *val_str(String *)
67
  {
68
    illegal_method_call((const char*)"val_str");
69
    return 0;
70
  };
71
  my_decimal *val_decimal(my_decimal *)
72
  {
73
    illegal_method_call((const char*)"val_decimal");
74
    return 0;
75
  };
520.1.22 by Brian Aker
Second pass of thd cleanup
76
  bool fix_fields(Session *session, Item **ref);
846 by Brian Aker
Removing on typedeffed class.
77
  void fix_after_pullout(Select_Lex *new_parent, Item **ref);
1 by brian
clean slate
78
  void cleanup();
520.1.22 by Brian Aker
Second pass of thd cleanup
79
  void split_sum_func(Session *session, Item **ref_pointer_array, List<Item> &fields);
1 by brian
clean slate
80
  table_map used_tables() const { return used_tables_cache; };
81
  bool const_item() const { return const_item_cache; };
82
  enum Item_result result_type() const { return ROW_RESULT; }
83
  void update_used_tables();
84
  virtual void print(String *str, enum_query_type query_type);
85
481 by Brian Aker
Remove all of uchar.
86
  bool walk(Item_processor processor, bool walk_subquery, unsigned char *arg);
87
  Item *transform(Item_transformer transformer, unsigned char *arg);
1 by brian
clean slate
88
482 by Brian Aker
Remove uint.
89
  uint32_t cols() { return arg_count; }
90
  Item* element_index(uint32_t i) { return items[i]; }
91
  Item** addr(uint32_t i) { return items + i; }
92
  bool check_cols(uint32_t c);
1 by brian
clean slate
93
  bool null_inside() { return with_null; };
94
  void bring_value();
95
};
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
96
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
97
} /* namespace drizzled */
98
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
99
#endif /* DRIZZLED_ITEM_ROW_H */