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_ITEM_DIRECT_REF_H
21
#define DRIZZLED_ITEM_DIRECT_REF_H
23
#include <drizzled/item/ref.h>
26
The same as Item_ref, but get value from val_* family of method to get
27
value of item on which it referred instead of result* family.
29
class Item_direct_ref :public Item_ref
32
Item_direct_ref(Name_resolution_context *context_arg, Item **item,
33
const char *table_name_arg,
34
const char *field_name_arg,
35
bool alias_name_used_arg= false)
36
:Item_ref(context_arg, item, table_name_arg,
37
field_name_arg, alias_name_used_arg)
39
/* Constructor need to process subselect with temporary tables (see Item) */
40
Item_direct_ref(Session *session, Item_direct_ref *item) : Item_ref(session, item) {}
44
String *val_str(String* tmp);
45
my_decimal *val_decimal(my_decimal *);
48
bool get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate);
49
virtual Ref_Type ref_type() { return DIRECT_REF; }
52
#endif /* DRIZZLED_ITEM_DIRECT_REF_H */