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
#include <drizzled/server_includes.h>
22
#include <drizzled/item/ref_null_helper.h>
23
#include <drizzled/item/subselect.h>
25
double Item_ref_null_helper::val_real()
28
double tmp= (*ref)->val_result();
29
owner->was_null|= null_value= (*ref)->null_value;
34
int64_t Item_ref_null_helper::val_int()
37
int64_t tmp= (*ref)->val_int_result();
38
owner->was_null|= null_value= (*ref)->null_value;
43
my_decimal *Item_ref_null_helper::val_decimal(my_decimal *decimal_value)
46
my_decimal *val= (*ref)->val_decimal_result(decimal_value);
47
owner->was_null|= null_value= (*ref)->null_value;
51
bool Item_ref_null_helper::val_bool()
54
bool val= (*ref)->val_bool_result();
55
owner->was_null|= null_value= (*ref)->null_value;
60
String* Item_ref_null_helper::val_str(String* s)
63
String* tmp= (*ref)->str_result(s);
64
owner->was_null|= null_value= (*ref)->null_value;
68
bool Item_ref_null_helper::get_date(DRIZZLE_TIME *ltime, uint32_t fuzzydate)
70
return (owner->was_null|= null_value= (*ref)->get_date(ltime, fuzzydate));
73
void Item_ref_null_helper::print(String *str, enum_query_type query_type)
75
str->append(STRING_WITH_LEN("<ref_null_helper>("));
77
(*ref)->print(str, query_type);