642.1.4
by Lee
move functions from item.cc/item.h to item directory |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
1999.6.1
by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file |
4 |
* Copyright (C) 2008 Sun Microsystems, Inc.
|
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
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 |
||
2234
by Brian Aker
Mass removal of ifdef/endif in favor of pragma once. |
20 |
#pragma once
|
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
21 |
|
2281.5.1
by Muhammad Umair
Merged charset declarations of global_charset_info.h and charset_info.h into charset.h header file. |
22 |
#include <drizzled/charset.h> |
2154.2.4
by Brian Aker
This fixes 716459 |
23 |
#include <drizzled/item/basic_constant.h> |
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 |
24 |
|
2313.3.7
by Olaf van der Spek
Return void |
25 |
namespace drizzled { |
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
26 |
|
2318.6.97
by Olaf van der Spek
Remove unused Item::orig_name |
27 |
class Item_null : public Item_basic_constant |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
28 |
{
|
29 |
public: |
|
670.2.4
by Monty Taylor
Removed more stuff from the headers. |
30 |
|
2318.6.97
by Olaf van der Spek
Remove unused Item::orig_name |
31 |
Item_null(const char *name_par=0) |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
32 |
{
|
33 |
maybe_null= null_value= true; |
|
34 |
max_length= 0; |
|
2318.6.97
by Olaf van der Spek
Remove unused Item::orig_name |
35 |
name= name_par ? name_par : "NULL"; |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
36 |
fixed= 1; |
37 |
collation.set(&my_charset_bin, DERIVATION_IGNORABLE); |
|
38 |
}
|
|
2318.6.97
by Olaf van der Spek
Remove unused Item::orig_name |
39 |
Type type() const { return NULL_ITEM; } |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
40 |
bool eq(const Item *item, bool binary_cmp) const; |
41 |
double val_real(); |
|
42 |
int64_t val_int(); |
|
43 |
String *val_str(String *str); |
|
2030.1.4
by Brian Aker
Change my_decimal to Decimal |
44 |
type::Decimal *val_decimal(type::Decimal *); |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
45 |
int save_in_field(Field *field, bool no_conversions); |
46 |
int save_safe_in_field(Field *field); |
|
2313.3.7
by Olaf van der Spek
Return void |
47 |
void send(plugin::Client *client, String *str); |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
48 |
enum Item_result result_type () const { return STRING_RESULT; } |
49 |
enum_field_types field_type() const { return DRIZZLE_TYPE_NULL; } |
|
50 |
bool basic_const_item() const { return 1; } |
|
51 |
Item *clone_item() { return new Item_null(name); } |
|
670.2.4
by Monty Taylor
Removed more stuff from the headers. |
52 |
bool is_null() { return true; } |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
53 |
|
2215.2.1
by Stewart Smith
remove enum_query_type which was effectively unused. It was set to one value once, compared to it once (i.e. always true) and passed around everywhere doing nothing. |
54 |
virtual void print(String *str); |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
55 |
|
2254
by Brian Aker
Shift CHARSET_INFO to charset_info_st |
56 |
Item *safe_charset_converter(const charset_info_st * const tocs); |
642.1.4
by Lee
move functions from item.cc/item.h to item directory |
57 |
};
|
58 |
||
59 |
class Item_null_result :public Item_null |
|
60 |
{
|
|
61 |
public: |
|
62 |
Field *result_field; |
|
63 |
Item_null_result() : Item_null(), result_field(0) {} |
|
64 |
bool is_result_field() { return result_field != 0; } |
|
65 |
void save_in_result_field(bool no_conversions) |
|
66 |
{
|
|
67 |
save_in_field(result_field, no_conversions); |
|
68 |
}
|
|
69 |
};
|
|
70 |
||
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
71 |
} /* namespace drizzled */ |
72 |