1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
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.
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.
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
20
#ifndef DRIZZLED_CACHED_ITEM_H
21
#define DRIZZLED_CACHED_ITEM_H
23
#include "drizzled/memory/sql_alloc.h"
24
#include "drizzled/sql_string.h"
25
#include "drizzled/my_decimal.h"
34
class Cached_item :public memory::SqlAlloc
38
Cached_item() :null_value(0) {}
39
virtual bool cmp(void)=0;
40
virtual ~Cached_item(); /*line -e1509 */
43
class Cached_item_str :public Cached_item
46
String value,tmp_value;
48
Cached_item_str(Session *session, Item *arg);
50
~Cached_item_str(); // Deallocate String:s
54
class Cached_item_real :public Cached_item
59
Cached_item_real(Item *item_par) :item(item_par),value(0.0) {}
63
class Cached_item_int :public Cached_item
68
Cached_item_int(Item *item_par) :item(item_par),value(0) {}
73
class Cached_item_decimal :public Cached_item
78
Cached_item_decimal(Item *item_par);
82
class Cached_item_field :public Cached_item
89
Cached_item_field(Field *arg_field);
93
Cached_item *new_Cached_item(Session *session, Item *item);
95
} /* namespace drizzled */
97
#endif /* DRIZZLED_CACHED_ITEM_H */