~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/get_user_var.h

  • Committer: Mark Atwood
  • Date: 2011-08-12 04:08:33 UTC
  • mfrom: (2385.2.17 refactor5)
  • Revision ID: me@mark.atwood.name-20110812040833-u6j85nc6ahuc0dtz
mergeĀ lp:~olafvdspek/drizzle/refactor5

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_FUNCTION_GET_USER_VAR_H
21
 
#define DRIZZLED_FUNCTION_GET_USER_VAR_H
 
20
#pragma once
22
21
 
23
22
#include <drizzled/function/func.h>
24
23
#include <drizzled/lex_string.h>
25
24
 
26
 
namespace drizzled
27
 
{
28
 
 
29
 
class user_var_entry;
 
25
namespace drizzled {
30
26
 
31
27
class Item_func_get_user_var :public Item_func
32
28
{
35
31
  Session &session;
36
32
 
37
33
public:
38
 
  LEX_STRING name; // keep it public
39
 
  Item_func_get_user_var(Session &session_arg, LEX_STRING a):
 
34
  lex_string_t name; // keep it public
 
35
  Item_func_get_user_var(Session &session_arg, lex_string_t a):
40
36
    Item_func(),
41
37
    m_cached_result_type(STRING_RESULT),
42
38
    session(session_arg),
43
39
    name(a)
44
40
  {}
45
41
  enum Functype functype() const { return GUSERVAR_FUNC; }
46
 
  LEX_STRING get_name() { return name; }
 
42
  lex_string_t get_name() { return name; }
47
43
  double val_real();
48
44
  int64_t val_int();
49
45
  type::Decimal *val_decimal(type::Decimal*);
50
46
  String *val_str(String* str);
51
47
  void fix_length_and_dec();
52
 
  virtual void print(String *str, enum_query_type query_type);
 
48
  virtual void print(String *str);
53
49
  enum Item_result result_type() const;
54
50
  /*
55
51
    We must always return variables as strings to guard against selects of type
64
60
 
65
61
} /* namespace drizzled */
66
62
 
67
 
#endif /* DRIZZLED_FUNCTION_GET_USER_VAR_H */