~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.h

  • Committer: Andrew Hutchings
  • Date: 2011-03-29 20:45:43 UTC
  • mfrom: (2257 drizzle)
  • mto: (2257.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: andrew@linuxjedi.co.uk-20110329204543-ssex0nuo8knncgwx
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
  /* Store functions returns 1 on overflow and -1 on fatal error */
201
201
  virtual int store(const char *to,
202
202
                    uint32_t length,
203
 
                    const CHARSET_INFO * const cs)=0;
 
203
                    const charset_info_st * const cs)=0;
204
204
  virtual int store(double nr)=0;
205
205
  virtual int store(int64_t nr, bool unsigned_val)=0;
206
206
  virtual int store_decimal(const type::Decimal *d)=0;
207
207
  int store_and_check(enum_check_fields check_level,
208
208
                      const char *to,
209
209
                      uint32_t length,
210
 
                      const CHARSET_INFO * const cs);
 
210
                      const charset_info_st * const cs);
211
211
  /**
212
212
    This is called when storing a date in a string.
213
213
 
407
407
    if (null_ptr)
408
408
      null_ptr= ADD_TO_PTR(null_ptr,ptr_diff,unsigned char*);
409
409
  }
410
 
  virtual void get_image(unsigned char *buff, uint32_t length, const CHARSET_INFO * const)
 
410
  virtual void get_image(unsigned char *buff, uint32_t length, const charset_info_st * const)
411
411
  {
412
412
    memcpy(buff,ptr,length);
413
413
  }
414
 
  virtual void get_image(std::basic_string<unsigned char> &buff, uint32_t length, const CHARSET_INFO * const)
 
414
  virtual void get_image(std::basic_string<unsigned char> &buff, uint32_t length, const charset_info_st * const)
415
415
  {
416
416
    buff.append(ptr,length);
417
417
  }
418
 
  virtual void set_image(const unsigned char *buff,uint32_t length, const CHARSET_INFO * const)
 
418
  virtual void set_image(const unsigned char *buff,uint32_t length, const charset_info_st * const)
419
419
  {
420
420
    memcpy(ptr,buff,length);
421
421
  }
596
596
  uint32_t fill_cache_field(CacheField *copy);
597
597
  virtual bool get_date(type::Time &ltime,uint32_t fuzzydate) const;
598
598
  virtual bool get_time(type::Time &ltime) const;
599
 
  virtual const CHARSET_INFO *charset(void) const { return &my_charset_bin; }
600
 
  virtual const CHARSET_INFO *sort_charset(void) const { return charset(); }
 
599
  virtual const charset_info_st *charset(void) const { return &my_charset_bin; }
 
600
  virtual const charset_info_st *sort_charset(void) const { return charset(); }
601
601
  virtual bool has_charset(void) const { return false; }
602
 
  virtual void set_charset(const CHARSET_INFO * const)
 
602
  virtual void set_charset(const charset_info_st * const)
603
603
  {}
604
604
  virtual enum Derivation derivation(void) const
605
605
  {
849
849
 * @retval
850
850
 *  true  - If string has some important data
851
851
 */
852
 
bool test_if_important_data(const CHARSET_INFO * const cs,
 
852
bool test_if_important_data(const charset_info_st * const cs,
853
853
                            const char *str,
854
854
                            const char *strend);
855
855