~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/null.h

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLE_SERVER_FIELD_NULL
22
22
#define DRIZZLE_SERVER_FIELD_NULL
23
23
 
24
 
#include <drizzled/field/str.h>
25
 
 
26
 
/*
27
 
 * Everything saved in this will disappear. It will always return NULL
 
24
/* 
 
25
  Everything saved in this will disappear. It will always return NULL 
28
26
 */
29
27
 
30
28
class Field_null :public Field_str {
31
29
  static unsigned char null[1];
32
30
public:
33
 
 
34
 
  using Field::store;
35
 
  using Field::val_str;
36
 
  using Field::cmp;
37
 
 
38
31
  Field_null(unsigned char *ptr_arg, uint32_t len_arg,
39
32
             enum utype unireg_check_arg, const char *field_name_arg,
40
33
             const CHARSET_INFO * const cs)
42
35
               unireg_check_arg, field_name_arg, cs)
43
36
    {}
44
37
  enum_field_types type() const { return DRIZZLE_TYPE_NULL;}
45
 
  int  store(const char *, uint32_t, const CHARSET_INFO * const)
46
 
  { null[0]=1; return 0; }
47
 
  int store(double)
48
 
  { null[0]=1; return 0; }
49
 
  int store(int64_t, bool)
50
 
  { null[0]=1; return 0; }
51
 
  int store_decimal(const my_decimal *)
 
38
  int  store(const char *to __attribute__((unused)),
 
39
             uint32_t length __attribute__((unused)),
 
40
             const CHARSET_INFO * const cs __attribute__((unused)))
 
41
  { null[0]=1; return 0; }
 
42
  int store(double nr __attribute__((unused)))
 
43
  { null[0]=1; return 0; }
 
44
  int store(int64_t nr __attribute__((unused)),
 
45
            bool unsigned_val __attribute__((unused)))
 
46
  { null[0]=1; return 0; }
 
47
  int store_decimal(const my_decimal *d __attribute__((unused)))
52
48
  { null[0]=1; return 0; }
53
49
  int reset(void)
54
50
  { return 0; }
57
53
  int64_t val_int(void)
58
54
  { return 0;}
59
55
  my_decimal *val_decimal(my_decimal *) { return 0; }
60
 
  String *val_str(String *, String *value2)
 
56
  String *val_str(String *value __attribute__((unused)),
 
57
                  String *value2)
61
58
  { value2->length(0); return value2;}
62
 
  int cmp(const unsigned char *, const unsigned char *) { return 0;}
63
 
  void sort_string(unsigned char *, uint32_t)  {}
 
59
  int cmp(const unsigned char *a __attribute__((unused)),
 
60
          const unsigned char *b __attribute__((unused))) { return 0;}
 
61
  void sort_string(unsigned char *buff __attribute__((unused)),
 
62
                   uint32_t length __attribute__((unused)))  {}
64
63
  uint32_t pack_length() const { return 0; }
65
64
  void sql_type(String &str) const;
66
65
  uint32_t size_of() const { return sizeof(*this); }