~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/decimal.h

  • Committer: Lee Bieber
  • Date: 2010-11-20 22:04:04 UTC
  • mfrom: (1942.1.4 b)
  • Revision ID: kalebral@gmail.com-20101120220404-2qpb4xuik9wv9u1q
Merge Lee -  Run bzr ignore for leftover files
Merge Shrews - Add a --replicate-query option to the server which controls whether or not the SQL query string is included in the GPB Statement messages.
Merge Andrew - fix bug 665119: drizzleslap has -i mapped to two options
Merge Andrew fix bug 674145: Table Names Not Case Matched

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
29
29
class Item_decimal :public Item_num
30
30
{
31
31
protected:
32
 
  type::Decimal decimal_value;
 
32
  my_decimal decimal_value;
33
33
public:
34
34
  Item_decimal(const char *str_arg, uint32_t length, const CHARSET_INFO * const charset);
35
 
  Item_decimal(const char *str, const type::Decimal *val_arg,
 
35
  Item_decimal(const char *str, const my_decimal *val_arg,
36
36
               uint32_t decimal_par, uint32_t length);
37
 
  Item_decimal(type::Decimal *value_par);
 
37
  Item_decimal(my_decimal *value_par);
38
38
  Item_decimal(int64_t val, bool unsig);
39
39
  Item_decimal(double val, int precision, int scale);
40
40
  Item_decimal(const unsigned char *bin, int precision, int scale);
45
45
  int64_t val_int();
46
46
  double val_real();
47
47
  String *val_str(String*);
48
 
  type::Decimal *val_decimal(type::Decimal *)
 
48
  my_decimal *val_decimal(my_decimal *)
49
49
  { return &decimal_value; }
50
50
  int save_in_field(Field *field, bool no_conversions);
51
51
  bool basic_const_item() const { return 1; }
56
56
  virtual void print(String *str, enum_query_type query_type);
57
57
  Item_num *neg()
58
58
  {
59
 
    class_decimal_neg(&decimal_value);
 
59
    my_decimal_neg(&decimal_value);
60
60
    unsigned_flag= !decimal_value.sign();
61
61
    return this;
62
62
  }
63
63
  uint32_t decimal_precision() const { return decimal_value.precision(); }
64
64
  bool eq(const Item *, bool binary_cmp) const;
65
 
  void set_decimal_value(type::Decimal *value_par);
 
65
  void set_decimal_value(my_decimal *value_par);
66
66
};
67
67
 
68
68
} /* namespace drizzled */