~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/int.h

  • Committer: Brian Aker
  • Date: 2009-01-09 22:07:54 UTC
  • Revision ID: brian@tangent.org-20090109220754-1y50h7lqi9i1ifcs
Dead test/wrong test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define DRIZZLED_ITEM_INT_H
22
22
 
23
23
#include <drizzled/item/num.h>
24
 
#include <drizzled/util/test.h>
25
 
 
26
 
namespace drizzled
27
 
{
28
24
 
29
25
class Item_int :public Item_num
30
26
{
38
34
    { max_length=length; fixed= 1; }
39
35
  Item_int(uint64_t i, uint32_t length= MY_INT64_NUM_DECIMAL_DIGITS)
40
36
    :value((int64_t)i)
41
 
  { max_length=length; fixed=1; }
 
37
    { max_length=length; fixed= 1; unsigned_flag= 1; }
42
38
  Item_int(const char *str_arg,int64_t i,uint32_t length) :value(i)
43
 
    { max_length= length; name= const_cast<char *>(str_arg); fixed= 1; }
 
39
    { max_length=length; name=(char*) str_arg; fixed= 1; }
44
40
  Item_int(const char *str_arg, uint32_t length=64);
45
41
  enum Type type() const { return INT_ITEM; }
46
42
  enum Item_result result_type () const { return INT_RESULT; }
55
51
  virtual void print(String *str, enum_query_type query_type);
56
52
  Item_num *neg() { value= -value; return this; }
57
53
  uint32_t decimal_precision() const
58
 
  { return (uint32_t)(max_length - test(value < 0)); }
 
54
  { return (uint)(max_length - test(value < 0)); }
59
55
  bool eq(const Item *, bool binary_cmp) const;
 
56
  bool check_vcol_func_processor(unsigned char *)
 
57
  { return false; }
60
58
};
61
59
 
62
 
} /* namespace drizzled */
63
 
 
64
60
#endif /* DRIZZLED_ITEM_INT_H */