~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/int64.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_INT64_H
 
22
#define DRIZZLED_FIELD_INT64_H
22
23
 
23
24
#include <drizzled/field/num.h>
24
25
 
71
72
  enum_field_types type() const { return DRIZZLE_TYPE_LONGLONG;}
72
73
  enum ha_base_keytype key_type() const
73
74
  { return unsigned_flag ? HA_KEYTYPE_ULONGLONG : HA_KEYTYPE_LONGLONG; }
74
 
  int store(const char *to,uint32_t length, const charset_info_st * const charset);
 
75
  int store(const char *to,uint32_t length, const CHARSET_INFO * const charset);
75
76
  int store(double nr);
76
77
  int store(int64_t nr, bool unsigned_val);
77
78
  int reset(void)
79
80
    ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0;
80
81
    return 0;
81
82
  }
82
 
  double val_real(void) const;
83
 
  int64_t val_int(void) const;
84
 
  String *val_str(String*,String *) const;
 
83
  double val_real(void);
 
84
  int64_t val_int(void);
 
85
  String *val_str(String*,String *);
85
86
  int cmp(const unsigned char *,const unsigned char *);
86
87
  void sort_string(unsigned char *buff,uint32_t length);
87
88
  uint32_t pack_length() const { return 8; }
88
89
  void sql_type(String &str) const;
89
90
  bool can_be_compared_as_int64_t() const { return true; }
90
 
  uint32_t max_display_length() { return MY_INT64_NUM_DECIMAL_DIGITS; }
 
91
  uint32_t max_display_length() { return 20; }
91
92
  virtual unsigned char *pack(unsigned char* to, const unsigned char *from,
92
93
                              uint32_t max_length,
93
94
                              bool low_byte_first);
101
102
} /* namespace field */
102
103
} /* namespace drizzled */
103
104
 
 
105
#endif /* DRIZZLED_FIELD_INT64_H */