~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/boolean.h

  • Committer: Andrew Hutchings
  • Date: 2011-02-01 10:23:22 UTC
  • mto: (2136.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2137.
  • Revision ID: andrew@linuxjedi.co.uk-20110201102322-oxztcyrjzg3c7yta
Fix counters cleanup

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
 
#pragma once
 
21
#ifndef DRIZZLED_FIELD_BOOLEAN_H
 
22
#define DRIZZLED_FIELD_BOOLEAN_H
22
23
 
23
24
#include <drizzled/field.h>
24
25
#include <string>
46
47
  uint32_t pack_length() const { return sizeof(unsigned char); }
47
48
  uint32_t key_length() const { return sizeof(unsigned char); }
48
49
 
49
 
  int store(const char *to, uint32_t length, const charset_info_st * const charset);
 
50
  int store(const char *to, uint32_t length, const CHARSET_INFO * const charset);
50
51
  int store(double );
51
52
  int store(int64_t nr, bool unsigned_val);
52
53
  int store_decimal(const drizzled::type::Decimal*);
53
54
 
54
 
  String *val_str(String*,String *) const;
55
 
  double val_real() const;
56
 
  int64_t val_int() const;
57
 
  type::Decimal *val_decimal(type::Decimal *) const;
 
55
  String *val_str(String*,String *);
 
56
  double val_real();
 
57
  int64_t val_int();
 
58
  type::Decimal *val_decimal(type::Decimal *);
58
59
 
59
60
  void sql_type(drizzled::String&) const;
60
61
 
63
64
  void sort_string(unsigned char*, uint32_t);
64
65
  uint32_t max_display_length() { return 5; } // longest string is "false"
65
66
 
66
 
  bool can_be_compared_as_int64_t() const
67
 
  {
68
 
    return true;
69
 
  }
70
 
 
71
67
  inline String *val_str(String *str) { return val_str(str, str); }
72
68
  uint32_t size_of() const { return sizeof(*this); }
73
69
 
93
89
} /* namespace field */
94
90
} /* namespace drizzled */
95
91
 
 
92
#endif /* DRIZZLED_FIELD_BOOLEAN_H */
96
93