~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/neg.h

  • Committer: David Shrewsbury
  • Date: 2011-01-13 18:43:55 UTC
  • mto: (2081.1.2 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2082.
  • Revision ID: shrewsbury.dave@gmail.com-20110113184355-wsmu0grg7tkxwdsc
Push ALTER SCHEMA through replication stream as proper GPB message instead of RAW_SQL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
class Item_func_neg :public Item_func_num1
30
30
{
 
31
  bool _is_negative;
 
32
 
31
33
public:
32
 
  Item_func_neg(Item *a) :Item_func_num1(a) {}
 
34
  Item_func_neg(Item *a) :
 
35
    Item_func_num1(a),
 
36
    _is_negative(true)
 
37
  {}
 
38
 
33
39
  double real_op();
34
40
  int64_t int_op();
35
 
  my_decimal *decimal_op(my_decimal *);
 
41
  type::Decimal *decimal_op(type::Decimal *);
36
42
  const char *func_name() const { return "-"; }
37
43
  enum Functype functype() const   { return NEG_FUNC; }
38
44
  void fix_length_and_dec();
39
45
  void fix_num_length_and_dec();
40
46
  uint32_t decimal_precision() const { return args[0]->decimal_precision(); }
 
47
 
 
48
  bool negative() const
 
49
  {
 
50
    return _is_negative;
 
51
  }
41
52
};
42
53
 
43
54
} /* namespace drizzled */