~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/function/set_user_var.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <drizzled/function/func.h>
23
23
 
24
 
namespace drizzled
25
 
{
 
24
namespace drizzled {
26
25
 
27
26
/* Handling of user definable variables */
28
27
 
29
 
class user_var_entry;
30
 
 
31
 
class Item_func_set_user_var :public Item_func
 
28
class Item_func_set_user_var : public Item_func
32
29
{
33
30
  enum Item_result cached_result_type;
34
31
  user_var_entry *entry;
45
42
  } save_result;
46
43
 
47
44
public:
48
 
  LEX_STRING name; // keep it public
49
 
  Item_func_set_user_var(LEX_STRING a,Item *b)
50
 
    :Item_func(b), cached_result_type(INT_RESULT), name(a)
 
45
  str_ref name; // keep it public
 
46
  Item_func_set_user_var(str_ref a,Item *b) :
 
47
    Item_func(b), cached_result_type(INT_RESULT), name(a)
51
48
  {}
52
 
  enum Functype functype() const { return SUSERVAR_FUNC; }
 
49
  Functype functype() const { return SUSERVAR_FUNC; }
53
50
  double val_real();
54
51
  int64_t val_int();
55
52
  String *val_str(String *str);
58
55
  int64_t val_int_result();
59
56
  String *str_result(String *str);
60
57
  type::Decimal *val_decimal_result(type::Decimal *);
61
 
  bool update_hash(void *ptr, uint32_t length, enum Item_result type,
62
 
                   const CHARSET_INFO * const cs, Derivation dv, bool unsigned_arg);
63
 
  bool send(plugin::Client *client, String *str_arg);
 
58
  void update_hash(data_ref, Item_result type, const charset_info_st* cs, Derivation dv, bool unsigned_arg);
 
59
  void send(plugin::Client *client, String *str_arg);
64
60
  void make_field(SendField *tmp_field);
65
61
  bool check(bool use_result_field);
66
 
  bool update();
67
 
  enum Item_result result_type () const { return cached_result_type; }
 
62
  void update();
 
63
  Item_result result_type () const { return cached_result_type; }
68
64
  bool fix_fields(Session *session, Item **ref);
69
65
  void fix_length_and_dec();
70
66
  virtual void print(String *str);