~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/enum.h

  • Committer: Mark Atwood
  • Date: 2011-10-27 05:08:12 UTC
  • mfrom: (2445.1.11 rf)
  • Revision ID: me@mark.atwood.name-20111027050812-1icvs72lb0u4xdc4
mergeĀ lp:~olafvdspek/drizzle/refactor8

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
 
#ifndef DRIZZLED_FIELD_ENUM_H
22
 
#define DRIZZLED_FIELD_ENUM_H
 
21
#pragma once
23
22
 
24
 
#include "drizzled/field/str.h"
 
23
#include <drizzled/field/str.h>
25
24
 
26
25
namespace drizzled
27
26
{
45
44
             unsigned char null_bit_arg,
46
45
             const char *field_name_arg,
47
46
             TYPELIB *typelib_arg,
48
 
             const CHARSET_INFO * const charset_arg)
 
47
             const charset_info_st * const charset_arg)
49
48
    :Field_str(ptr_arg,
50
49
               len_arg,
51
50
               null_ptr_arg,
58
57
  }
59
58
  Field *new_field(memory::Root *root, Table *new_table, bool keep_type);
60
59
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
61
 
  int  store(const char *to, uint32_t length, const CHARSET_INFO * const);
 
60
  int  store(const char *to, uint32_t length, const charset_info_st * const);
62
61
  int  store(double nr);
63
62
  int  store(int64_t nr, bool unsigned_val);
64
 
  double val_real(void);
65
 
  int64_t val_int(void);
66
 
  String *val_str(String*, String *);
 
63
  double val_real(void) const;
 
64
  int64_t val_int(void) const;
 
65
  String *val_str(String*, String *) const;
67
66
  int cmp(const unsigned char *, const unsigned char *);
68
67
  void sort_string(unsigned char *buff, uint32_t length);
69
68
  void store_type(uint64_t value);
70
 
  void sql_type(String &str) const;
71
69
  bool eq_def(Field *field);
72
70
  enum_field_types type() const
73
71
  {
103
101
    return true;
104
102
  }
105
103
  /* enum and set are sorted as integers */
106
 
  const CHARSET_INFO *sort_charset(void) const { return &my_charset_bin; }
 
104
  const charset_info_st *sort_charset(void) const { return &my_charset_bin; }
107
105
};
108
106
 
109
107
} /* namespace drizzled */
110
108
 
111
 
#endif /* DRIZZLED_FIELD_ENUM_H */