18
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef DRIZZLED_FIELD_NUM_H
22
#define DRIZZLED_FIELD_NUM_H
24
#include "drizzled/field.h"
23
#include <drizzled/field.h>
33
32
bool decimal_precision; // Purify cannot handle bit fields & only for decimal type
34
33
bool unsigned_flag; // Purify cannot handle bit fields
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
40
Item_result result_type () const { return REAL_RESULT; }
40
42
friend class CreateField;
41
44
void make_field(SendField *);
42
46
uint32_t decimals() const { return (uint32_t) dec; }
43
48
uint32_t size_of() const { return sizeof(*this); }
44
50
bool eq_def(Field *field);
45
int store_decimal(const my_decimal *);
46
my_decimal *val_decimal(my_decimal *);
52
int store_decimal(const type::Decimal *);
54
type::Decimal *val_decimal(type::Decimal *) const;
47
56
uint32_t is_equal(CreateField *new_field);
48
int check_int(const CHARSET_INFO * const cs, const char *str, int length,
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,
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);
55
66
} /* namespace drizzled */
57
#endif /* DRIZZLED_FIELD_NUM_H */