~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/direct_ref.h

  • Committer: Monty Taylor
  • Date: 2008-08-02 00:06:32 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802000632-jsse0zdd9r6ic5ku
Actually turn gettext on...

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
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
 
#ifndef DRIZZLED_ITEM_DIRECT_REF_H
21
 
#define DRIZZLED_ITEM_DIRECT_REF_H
22
 
 
23
 
#include <drizzled/item/ref.h>
24
 
 
25
 
namespace drizzled
26
 
{
27
 
 
28
 
/*
29
 
  The same as Item_ref, but get value from val_* family of method to get
30
 
  value of item on which it referred instead of result* family.
31
 
*/
32
 
class Item_direct_ref :public Item_ref
33
 
{
34
 
public:
35
 
  Item_direct_ref(Name_resolution_context *context_arg, Item **item,
36
 
                  const char *table_name_arg,
37
 
                  const char *field_name_arg,
38
 
                  bool alias_name_used_arg= false)
39
 
    :Item_ref(context_arg, item, table_name_arg,
40
 
              field_name_arg, alias_name_used_arg)
41
 
  {}
42
 
  /* Constructor need to process subselect with temporary tables (see Item) */
43
 
  Item_direct_ref(Session *session, Item_direct_ref *item) : Item_ref(session, item) {}
44
 
 
45
 
  double val_real();
46
 
  int64_t val_int();
47
 
  String *val_str(String* tmp);
48
 
  my_decimal *val_decimal(my_decimal *);
49
 
  bool val_bool();
50
 
  bool is_null();
51
 
  bool get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate);
52
 
  virtual Ref_Type ref_type() { return DIRECT_REF; }
53
 
};
54
 
 
55
 
} /* namespace drizzled */
56
 
 
57
 
#endif /* DRIZZLED_ITEM_DIRECT_REF_H */