~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/user_var_entry.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-23 10:31:37 UTC
  • mto: (2247.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2248.
  • Revision ID: olafvdspek@gmail.com-20110323103137-lwevis2tfchgu18u
Propogate return void

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
 
21
 
#ifndef DRIZZLED_USER_VAR_ENTRY_H
22
 
#define DRIZZLED_USER_VAR_ENTRY_H
23
 
 
24
 
#include "drizzled/query_id.h"
25
 
 
26
 
namespace drizzled
27
 
{
28
 
 
29
 
// this is needed for user_vars hash
 
21
#pragma once
 
22
 
 
23
#include <drizzled/dtcollation.h>
 
24
#include <drizzled/item_result.h>
 
25
 
 
26
namespace drizzled {
 
27
 
 
28
namespace type { class Decimal; }
 
29
 
 
30
typedef uint64_t query_id_t;
 
31
 
30
32
class user_var_entry
31
33
{
32
34
 public:
46
48
 
47
49
  ~user_var_entry()
48
50
  {
49
 
    if (name.str) 
50
 
      free(name.str);
 
51
    free(name.str);
 
52
    free(value);
 
53
  }
51
54
 
52
 
    if (value) 
53
 
      free(value);
54
 
  }
55
55
  LEX_STRING name;
56
56
  char *value;
57
57
  ulong length;
64
64
  double val_real(bool *null_value);
65
65
  int64_t val_int(bool *null_value) const;
66
66
  String *val_str(bool *null_value, String *str, uint32_t decimals);
67
 
  my_decimal *val_decimal(bool *null_value, my_decimal *result);
 
67
  type::Decimal *val_decimal(bool *null_value, type::Decimal *result);
68
68
  DTCollation collation;
69
69
 
70
 
  bool update_hash(bool set_null, void *ptr, uint32_t length,
 
70
  void update_hash(bool set_null, void *ptr, uint32_t length,
71
71
                   Item_result type, const CHARSET_INFO * const cs, Derivation dv,
72
72
                   bool unsigned_arg);
73
73
};
74
74
 
75
75
} /* namespace drizzled */
76
76
 
77
 
#endif /* DRIZZLED_USER_VAR_ENTRY_H */