~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/null.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-28 14:32:36 UTC
  • mto: (2257.1.1 build) (2276.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: olafvdspek@gmail.com-20110328143236-4ge1d793iqaktfq0
Common fwd

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLED_FIELD_NULL_H
22
 
#define DRIZZLED_FIELD_NULL_H
 
21
#pragma once
23
22
 
24
23
#include <drizzled/field/str.h>
25
24
 
42
41
 
43
42
  Field_null(unsigned char *ptr_arg,
44
43
             uint32_t len_arg,
45
 
             const char *field_name_arg,
46
 
             const CHARSET_INFO * const cs)
47
 
    :Field_str(ptr_arg,
48
 
               len_arg,
49
 
               null,
50
 
               1,
51
 
                     field_name_arg,
52
 
               cs)
 
44
             const char *field_name_arg) :
 
45
    Field_str(ptr_arg,
 
46
              len_arg,
 
47
              null,
 
48
              1,
 
49
              field_name_arg,
 
50
              &my_charset_bin)
53
51
  {}
 
52
 
54
53
  enum_field_types type() const
55
54
  {
56
55
    return DRIZZLE_TYPE_NULL;
57
56
  }
58
 
  int  store(const char *, uint32_t, const CHARSET_INFO * const)
 
57
  int  store(const char *, uint32_t, const charset_info_st * const)
59
58
  {
60
59
    null[0]= 1;
61
60
    return 0;
70
69
    null[0]= 1;
71
70
    return 0;
72
71
  }
73
 
  int store_decimal(const my_decimal *)
 
72
  int store_decimal(const type::Decimal *)
74
73
  {
75
74
    null[0]= 1;
76
75
    return 0;
79
78
  {
80
79
    return 0;
81
80
  }
82
 
  double val_real(void)
 
81
  double val_real(void) const
83
82
  {
84
83
    return 0.0;
85
84
  }
86
 
  int64_t val_int(void)
87
 
  {
88
 
    return 0;
89
 
  }
90
 
  my_decimal *val_decimal(my_decimal *)
91
 
  {
92
 
    return 0;
93
 
  }
94
 
  String *val_str(String *, String *value2)
 
85
  int64_t val_int(void) const
 
86
  {
 
87
    return 0;
 
88
  }
 
89
  type::Decimal *val_decimal(type::Decimal *) const
 
90
  {
 
91
    return 0;
 
92
  }
 
93
  String *val_str(String *, String *value2) const
95
94
  {
96
95
    value2->length(0);
97
96
    return value2;
119
118
 
120
119
} /* namespace drizzled */
121
120
 
122
 
#endif /* DRIZZLED_FIELD_NULL_H */