~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.h

  • Committer: Brian Aker
  • Date: 2008-08-07 16:29:49 UTC
  • mfrom: (264.1.20 codestyle)
  • Revision ID: brian@tangent.org-20080807162949-7o8eyjgdn8ms3n1a
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLE_SERVER_FIELD_BLOB
22
22
#define DRIZZLE_SERVER_FIELD_BLOB
23
23
 
24
 
#include <drizzled/mysql_priv.h>
25
 
 
26
24
class Field_blob :public Field_longstr {
27
25
protected:
28
26
  uint packlength;
30
28
public:
31
29
  Field_blob(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
32
30
             enum utype unireg_check_arg, const char *field_name_arg,
33
 
             TABLE_SHARE *share, uint blob_pack_length, CHARSET_INFO *cs);
 
31
             TABLE_SHARE *share, uint blob_pack_length, const CHARSET_INFO * const cs);
34
32
  Field_blob(uint32_t len_arg,bool maybe_null_arg, const char *field_name_arg,
35
 
             CHARSET_INFO *cs)
 
33
             const CHARSET_INFO * const cs)
36
34
    :Field_longstr((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0,
37
35
                   NONE, field_name_arg, cs),
38
36
    packlength(4)
40
38
    flags|= BLOB_FLAG;
41
39
  }
42
40
  Field_blob(uint32_t len_arg,bool maybe_null_arg, const char *field_name_arg,
43
 
             CHARSET_INFO *cs, bool set_packlength)
 
41
             const CHARSET_INFO * const cs, bool set_packlength)
44
42
    :Field_longstr((uchar*) 0,len_arg, maybe_null_arg ? (uchar*) "": 0, 0,
45
43
                   NONE, field_name_arg, cs)
46
44
  {
60
58
  enum_field_types type() const { return DRIZZLE_TYPE_BLOB;}
61
59
  enum ha_base_keytype key_type() const
62
60
    { return binary() ? HA_KEYTYPE_VARBINARY2 : HA_KEYTYPE_VARTEXT2; }
63
 
  int  store(const char *to,uint length,CHARSET_INFO *charset);
 
61
  int  store(const char *to,uint length, const CHARSET_INFO * const charset);
64
62
  int  store(double nr);
65
63
  int  store(int64_t nr, bool unsigned_val);
66
64
  double val_real(void);