~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/num.h

  • Committer: patrick crews
  • Date: 2011-06-08 03:02:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2329.
  • Revision ID: gleebix@gmail.com-20110608030227-updkyv2652zvfajc
Initial voodoo worked to give us a crashme mode.  Need docs still

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_NUM_H
22
 
#define DRIZZLED_FIELD_NUM_H
 
21
#pragma once
23
22
 
24
 
#include "drizzled/field.h"
 
23
#include <drizzled/field.h>
25
24
 
26
25
namespace drizzled
27
26
{
32
31
  const uint8_t dec;
33
32
  bool decimal_precision;       // Purify cannot handle bit fields & only for decimal type
34
33
  bool unsigned_flag;   // Purify cannot handle bit fields
 
34
 
35
35
  Field_num(unsigned char *ptr_arg,uint32_t len_arg, unsigned char *null_ptr_arg,
36
36
            unsigned char null_bit_arg, utype unireg_check_arg,
37
37
            const char *field_name_arg,
38
38
            uint8_t dec_arg, bool zero_arg, bool unsigned_arg);
 
39
 
39
40
  Item_result result_type () const { return REAL_RESULT; }
 
41
 
40
42
  friend class CreateField;
 
43
 
41
44
  void make_field(SendField *);
 
45
 
42
46
  uint32_t decimals() const { return (uint32_t) dec; }
 
47
 
43
48
  uint32_t size_of() const { return sizeof(*this); }
 
49
 
44
50
  bool eq_def(Field *field);
45
 
  int store_decimal(const my_decimal *);
46
 
  my_decimal *val_decimal(my_decimal *);
 
51
 
 
52
  int store_decimal(const type::Decimal *);
 
53
 
 
54
  type::Decimal *val_decimal(type::Decimal *) const;
 
55
 
47
56
  uint32_t is_equal(CreateField *new_field);
48
 
  int check_int(const CHARSET_INFO * const cs, const char *str, int length,
 
57
 
 
58
  int check_int(const charset_info_st * const cs, const char *str, int length,
49
59
                const char *int_end, int error);
50
 
  bool get_int(const CHARSET_INFO * const cs, const char *from, uint32_t len,
 
60
 
 
61
  bool get_int(const charset_info_st * const cs, const char *from, uint32_t len,
51
62
               int64_t *rnd, uint64_t unsigned_max,
52
63
               int64_t signed_min, int64_t signed_max);
53
64
};
54
65
 
55
66
} /* namespace drizzled */
56
67
 
57
 
#endif /* DRIZZLED_FIELD_NUM_H */