Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
cached_item.h
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, Inc.
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
*/
19
20
#pragma once
21
22
#include <drizzled/memory/sql_alloc.h>
23
#include <drizzled/sql_string.h>
24
#include <drizzled/type/decimal.h>
25
26
namespace
drizzled {
27
28
class
Cached_item
:
public
memory::SqlAlloc
29
{
30
public
:
31
bool
null_value;
32
Cached_item
() :null_value(0) {}
33
virtual
bool
cmp(
void
)=0;
34
virtual
~
Cached_item
();
/*line -e1509 */
35
};
36
37
class
Cached_item_str
:
public
Cached_item
38
{
39
Item
*item;
40
String
value,tmp_value;
41
public
:
42
Cached_item_str
(
Session
*session,
Item
*arg);
43
bool
cmp(
void
);
44
~
Cached_item_str
();
// Deallocate String:s
45
};
46
47
48
class
Cached_item_real
:
public
Cached_item
49
{
50
Item
*item;
51
double
value;
52
public
:
53
Cached_item_real
(
Item
*item_par) :item(item_par),value(0.0) {}
54
bool
cmp(
void
);
55
};
56
57
class
Cached_item_int
:
public
Cached_item
58
{
59
Item
*item;
60
int64_t value;
61
public
:
62
Cached_item_int
(
Item
*item_par) :item(item_par),value(0) {}
63
bool
cmp(
void
);
64
};
65
66
67
class
Cached_item_decimal
:
public
Cached_item
68
{
69
Item
*item;
70
type::Decimal
value;
71
public
:
72
Cached_item_decimal
(
Item
*item_par);
73
bool
cmp(
void
);
74
};
75
76
class
Cached_item_field
:
public
Cached_item
77
{
78
unsigned
char
*buff;
79
Field
*field;
80
uint32_t length;
81
82
public
:
83
Cached_item_field
(
Field
*arg_field);
84
bool
cmp(
void
);
85
};
86
87
Cached_item
*
new_Cached_item
(
Session
*session,
Item
*item);
88
89
}
/* namespace drizzled */
90
drizzled
cached_item.h
Generated on Sun Jun 3 2012 18:09:14 for drizzle by
1.8.1