~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/set_user_var.h

  • Committer: Brian Aker
  • Date: 2009-10-16 10:27:33 UTC
  • mfrom: (1183.1.4 merge)
  • Revision ID: brian@gaz-20091016102733-b10po5oup0hjlilh
Merge Engine changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
22
22
 
23
23
#include <drizzled/function/func.h>
24
24
 
25
 
namespace drizzled
26
 
{
27
 
 
28
25
/* Handling of user definable variables */
29
26
 
30
27
class user_var_entry;
35
32
  user_var_entry *entry;
36
33
  char buffer[MAX_FIELD_WIDTH];
37
34
  String value;
38
 
  type::Decimal decimal_buff;
 
35
  my_decimal decimal_buff;
39
36
  bool null_item;
40
37
  union
41
38
  {
42
39
    int64_t vint;
43
40
    double vreal;
44
41
    String *vstr;
45
 
    type::Decimal *vdec;
 
42
    my_decimal *vdec;
46
43
  } save_result;
47
44
 
48
45
public:
54
51
  double val_real();
55
52
  int64_t val_int();
56
53
  String *val_str(String *str);
57
 
  type::Decimal *val_decimal(type::Decimal *);
 
54
  my_decimal *val_decimal(my_decimal *);
58
55
  double val_result();
59
56
  int64_t val_int_result();
60
57
  String *str_result(String *str);
61
 
  type::Decimal *val_decimal_result(type::Decimal *);
 
58
  my_decimal *val_decimal_result(my_decimal *);
62
59
  bool update_hash(void *ptr, uint32_t length, enum Item_result type,
63
60
                   const CHARSET_INFO * const cs, Derivation dv, bool unsigned_arg);
64
 
  bool send(plugin::Client *client, String *str_arg);
 
61
  bool send(drizzled::plugin::Client *client, String *str_arg);
65
62
  void make_field(SendField *tmp_field);
66
63
  bool check(bool use_result_field);
67
64
  bool update();
69
66
  bool fix_fields(Session *session, Item **ref);
70
67
  void fix_length_and_dec();
71
68
  virtual void print(String *str, enum_query_type query_type);
72
 
 
 
69
  void print_as_stmt(String *str, enum_query_type query_type);
73
70
  const char *func_name() const { return "set_user_var"; }
74
71
  int save_in_field(Field *field, bool no_conversions,
75
72
                    bool can_use_result_field);
81
78
  bool register_field_in_read_map(unsigned char *arg);
82
79
};
83
80
 
84
 
} /* namespace drizzled */
85
 
 
86
81
#endif /* DRIZZLED_FUNCTION_SET_USER_VAR_H */