22 #include <drizzled/item/num.h>
23 #include <drizzled/util/test.h>
32 Item_int(int32_t i,uint32_t length= MY_INT32_NUM_DECIMAL_DIGITS) :
34 { max_length=length;
fixed= 1; }
36 Item_int(int64_t i,uint32_t length= MY_INT64_NUM_DECIMAL_DIGITS) :
38 { max_length=length;
fixed= 1; }
40 Item_int(uint64_t i, uint32_t length= MY_INT64_NUM_DECIMAL_DIGITS) :
42 { max_length=length;
fixed=1; }
44 Item_int(
const char *str_arg,int64_t i,uint32_t length) :
46 { max_length= length;
name=
const_cast<char *
>(str_arg);
fixed= 1; }
48 Item_int(
const char *str_arg, uint32_t length=64);
50 enum Type type()
const {
return INT_ITEM; }
52 enum Item_result result_type ()
const {
return INT_RESULT; }
54 enum_field_types field_type()
const {
return DRIZZLE_TYPE_LONGLONG; }
64 int save_in_field(
Field *field,
bool no_conversions);
70 virtual void print(String *str);
72 Item_num *neg() { value= -value;
return this; }
74 uint32_t decimal_precision()
const
75 {
return (uint32_t)(max_length - test(value < 0)); }
77 bool eq(
const Item *,
bool binary_cmp)
const;