~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/null.h

  • Committer: Monty Taylor
  • Date: 2009-10-06 19:40:45 UTC
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20091006194045-ojptaq2sx6ck6q63
No more server_includes.h in headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <drizzled/field/str.h>
25
25
 
26
 
namespace drizzled
27
 
{
28
 
 
29
26
/*
30
27
 * Everything saved in this will disappear. It will always return NULL
31
28
 */
42
39
 
43
40
  Field_null(unsigned char *ptr_arg,
44
41
             uint32_t len_arg,
45
 
             const char *field_name_arg) :
46
 
    Field_str(ptr_arg,
47
 
              len_arg,
48
 
              null,
49
 
              1,
50
 
              field_name_arg,
51
 
              &my_charset_bin)
 
42
             const char *field_name_arg,
 
43
             const CHARSET_INFO * const cs)
 
44
    :Field_str(ptr_arg,
 
45
               len_arg,
 
46
               null,
 
47
               1,
 
48
                     field_name_arg,
 
49
               cs)
52
50
  {}
53
 
 
54
51
  enum_field_types type() const
55
52
  {
56
53
    return DRIZZLE_TYPE_NULL;
70
67
    null[0]= 1;
71
68
    return 0;
72
69
  }
73
 
  int store_decimal(const type::Decimal *)
 
70
  int store_decimal(const my_decimal *)
74
71
  {
75
72
    null[0]= 1;
76
73
    return 0;
79
76
  {
80
77
    return 0;
81
78
  }
82
 
  double val_real(void) const
 
79
  double val_real(void)
83
80
  {
84
81
    return 0.0;
85
82
  }
86
 
  int64_t val_int(void) const
87
 
  {
88
 
    return 0;
89
 
  }
90
 
  type::Decimal *val_decimal(type::Decimal *) const
91
 
  {
92
 
    return 0;
93
 
  }
94
 
  String *val_str(String *, String *value2) const
 
83
  int64_t val_int(void)
 
84
  {
 
85
    return 0;
 
86
  }
 
87
  my_decimal *val_decimal(my_decimal *)
 
88
  {
 
89
    return 0;
 
90
  }
 
91
  String *val_str(String *, String *value2)
95
92
  {
96
93
    value2->length(0);
97
94
    return value2;
117
114
  }
118
115
};
119
116
 
120
 
} /* namespace drizzled */
121
 
 
122
117
#endif /* DRIZZLED_FIELD_NULL_H */