~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.h

  • Committer: Monty Taylor
  • Date: 2008-10-16 06:32:59 UTC
  • mfrom: (518 drizzle)
  • mto: (511.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 521.
  • Revision ID: monty@inaugust.com-20081016063259-fwbqogq7lnezct0l
Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
812
812
                        const char *cannot_convert_error_pos,
813
813
                        const char *end,
814
814
                        const CHARSET_INFO * const cs);
815
 
 
816
 
 
817
 
class Field_tiny :public Field_num {
818
 
public:
819
 
  Field_tiny(unsigned char *ptr_arg, uint32_t len_arg, unsigned char *null_ptr_arg,
820
 
             unsigned char null_bit_arg,
821
 
             enum utype unireg_check_arg, const char *field_name_arg,
822
 
             bool zero_arg, bool unsigned_arg)
823
 
    :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
824
 
               unireg_check_arg, field_name_arg,
825
 
               0, zero_arg,unsigned_arg)
826
 
    {}
827
 
  enum Item_result result_type () const { return INT_RESULT; }
828
 
  enum_field_types type() const { return DRIZZLE_TYPE_TINY;}
829
 
  enum ha_base_keytype key_type() const
830
 
    { return unsigned_flag ? HA_KEYTYPE_BINARY : HA_KEYTYPE_INT8; }
831
 
  int store(const char *to,uint32_t length, const CHARSET_INFO * const charset);
832
 
  int store(double nr);
833
 
  int store(int64_t nr, bool unsigned_val);
834
 
  int reset(void) { ptr[0]=0; return 0; }
835
 
  double val_real(void);
836
 
  int64_t val_int(void);
837
 
  String *val_str(String*,String *);
838
 
  bool send_binary(Protocol *protocol);
839
 
  int cmp(const unsigned char *,const unsigned char *);
840
 
  void sort_string(unsigned char *buff,uint32_t length);
841
 
  uint32_t pack_length() const { return 1; }
842
 
  void sql_type(String &str) const;
843
 
  uint32_t max_display_length() { return 4; }
844
 
 
845
 
  virtual unsigned char *pack(unsigned char* to, const unsigned char *from,
846
 
                      uint32_t max_length __attribute__((unused)),
847
 
                      bool low_byte_first __attribute__((unused)))
848
 
  {
849
 
    *to= *from;
850
 
    return to + 1;
851
 
  }
852
 
 
853
 
  virtual const unsigned char *unpack(unsigned char* to, const unsigned char *from,
854
 
                              uint32_t param_data __attribute__((unused)),
855
 
                              bool low_byte_first __attribute__((unused)))
856
 
  {
857
 
    *to= *from;
858
 
    return from + 1;
859
 
  }
860
 
};