~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/fstring.h

  • Committer: Monty Taylor
  • Date: 2008-08-02 01:03:15 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802010315-65h5938pymg9d99z
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLE_SERVER_FIELD_STRING
22
22
#define DRIZZLE_SERVER_FIELD_STRING
23
23
 
 
24
#include <drizzled/mysql_priv.h>
 
25
 
24
26
class Field_string :public Field_longstr {
25
27
public:
26
28
  bool can_alter_field_type;
27
29
  Field_string(uchar *ptr_arg, uint32_t len_arg,uchar *null_ptr_arg,
28
30
               uchar null_bit_arg,
29
31
               enum utype unireg_check_arg, const char *field_name_arg,
30
 
               const CHARSET_INFO * const cs)
 
32
               CHARSET_INFO *cs)
31
33
    :Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
32
34
                   unireg_check_arg, field_name_arg, cs),
33
35
     can_alter_field_type(1) {};
34
36
  Field_string(uint32_t len_arg,bool maybe_null_arg, const char *field_name_arg,
35
 
               const CHARSET_INFO * const cs)
 
37
               CHARSET_INFO *cs)
36
38
    :Field_longstr((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0,
37
39
                   NONE, field_name_arg, cs),
38
40
     can_alter_field_type(1) {};
50
52
                          (has_charset() ? ' ' : 0));
51
53
    return 0;
52
54
  }
53
 
  int store(const char *to,uint length, const CHARSET_INFO * const charset);
 
55
  int store(const char *to,uint length,CHARSET_INFO *charset);
54
56
  int store(int64_t nr, bool unsigned_val);
55
57
  int store(double nr) { return Field_str::store(nr); } /* QQ: To be deleted */
56
58
  double val_real(void);
68
70
  { return (field_metadata & 0x00ff); }
69
71
  uint row_pack_length() { return (field_length + 1); }
70
72
  int pack_cmp(const uchar *a,const uchar *b,uint key_length,
71
 
               bool insert_or_update);
72
 
  int pack_cmp(const uchar *b,uint key_length,bool insert_or_update);
 
73
               my_bool insert_or_update);
 
74
  int pack_cmp(const uchar *b,uint key_length,my_bool insert_or_update);
73
75
  uint packed_col_length(const uchar *to, uint length);
74
76
  uint max_packed_col_length(uint max_length);
75
77
  uint size_of() const { return sizeof(*this); }