~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/decimal.h

  • Committer: Brian Aker
  • Date: 2009-11-12 16:13:04 UTC
  • mfrom: (1211.1.7 staging)
  • Revision ID: brian@gaz-20091112161304-opamiauv36fg0n6u
Rollup of Brian, Padraig, and Stewart patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/field/num.h>
25
25
 
26
26
/* New decimal/numeric field which use fixed point arithmetic */
27
 
class Field_new_decimal :public Field_num {
 
27
class Field_decimal :public Field_num {
28
28
private:
29
29
  int do_save_field_metadata(unsigned char *first_byte);
30
30
public:
44
44
    So for example we need to count length from precision handling
45
45
    CREATE TABLE ( DECIMAL(x,y))
46
46
  */
47
 
  Field_new_decimal(unsigned char *ptr_arg,
48
 
                    uint32_t len_arg,
49
 
                    unsigned char *null_ptr_arg,
50
 
                    unsigned char null_bit_arg,
51
 
                    enum utype unireg_check_arg,
52
 
                    const char *field_name_arg,
53
 
                    uint8_t dec_arg,
54
 
                    bool zero_arg,
55
 
                    bool unsigned_arg);
56
 
  Field_new_decimal(uint32_t len_arg,
57
 
                    bool maybe_null_arg,
58
 
                    const char *field_name_arg,
59
 
                    uint8_t dec_arg,
60
 
                    bool unsigned_arg);
61
 
  enum_field_types type() const { return DRIZZLE_TYPE_NEWDECIMAL;}
 
47
  Field_decimal(unsigned char *ptr_arg,
 
48
                uint32_t len_arg,
 
49
                unsigned char *null_ptr_arg,
 
50
                unsigned char null_bit_arg,
 
51
                enum utype unireg_check_arg,
 
52
                const char *field_name_arg,
 
53
                uint8_t dec_arg,
 
54
                bool zero_arg,
 
55
                bool unsigned_arg);
 
56
  Field_decimal(uint32_t len_arg,
 
57
                bool maybe_null_arg,
 
58
                const char *field_name_arg,
 
59
                uint8_t dec_arg,
 
60
                bool unsigned_arg);
 
61
  enum_field_types type() const { return DRIZZLE_TYPE_DECIMAL;}
62
62
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; }
63
63
  Item_result result_type () const { return DECIMAL_RESULT; }
64
64
  int  reset(void);
85
85
  int compatible_field_size(uint32_t field_metadata);
86
86
  uint32_t is_equal(CreateField *new_field);
87
87
  virtual const unsigned char *unpack(unsigned char* to, const unsigned char *from,
88
 
                              uint32_t param_data, bool low_byte_first);
 
88
                                      uint32_t param_data, bool low_byte_first);
89
89
};
90
90
 
91
91
#endif /* DRIZZLED_FIELD_DECIMAL_H */