33
Item_int(int32_t i,uint32_t length= MY_INT32_NUM_DECIMAL_DIGITS)
35
{ 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; }
39
Item_int(uint64_t i, uint32_t length= MY_INT64_NUM_DECIMAL_DIGITS)
34
Item_int(int32_t i,uint32_t length= MY_INT32_NUM_DECIMAL_DIGITS) :
36
{ max_length=length; fixed= 1; }
38
Item_int(int64_t i,uint32_t length= MY_INT64_NUM_DECIMAL_DIGITS) :
40
{ max_length=length; fixed= 1; }
42
Item_int(uint64_t i, uint32_t length= MY_INT64_NUM_DECIMAL_DIGITS) :
41
44
{ max_length=length; fixed=1; }
42
Item_int(const char *str_arg,int64_t i,uint32_t length) :value(i)
46
Item_int(const char *str_arg,int64_t i,uint32_t length) :
43
48
{ max_length= length; name= const_cast<char *>(str_arg); fixed= 1; }
44
50
Item_int(const char *str_arg, uint32_t length=64);
45
52
enum Type type() const { return INT_ITEM; }
46
54
enum Item_result result_type () const { return INT_RESULT; }
47
56
enum_field_types field_type() const { return DRIZZLE_TYPE_LONGLONG; }
48
58
int64_t val_int() { assert(fixed == 1); return value; }
49
60
double val_real() { assert(fixed == 1); return (double) value; }
50
62
my_decimal *val_decimal(my_decimal *);
51
64
String *val_str(String*);
52
66
int save_in_field(Field *field, bool no_conversions);
53
68
bool basic_const_item() const { return 1; }
54
70
Item *clone_item() { return new Item_int(name,value,max_length); }
55
72
virtual void print(String *str, enum_query_type query_type);
56
74
Item_num *neg() { value= -value; return this; }
57
76
uint32_t decimal_precision() const
58
77
{ return (uint32_t)(max_length - test(value < 0)); }
59
79
bool eq(const Item *, bool binary_cmp) const;