~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/num.h

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
1
/* - mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
4
 *  Copyright (C) 2008 MySQL
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLED_FIELD_NUM_H
22
 
#define DRIZZLED_FIELD_NUM_H
23
 
 
24
 
#include "drizzled/field.h"
25
 
 
26
 
namespace drizzled
27
 
{
28
 
 
29
 
class Field_num :public Field 
30
 
{
 
21
#ifndef DRIZZLE_SERVER_FIELD_NUM
 
22
#define DRIZZLE_SERVER_FIELD_NUM
 
23
 
 
24
class Field_num :public Field {
31
25
public:
32
26
  const uint8_t dec;
33
27
  bool decimal_precision;       // Purify cannot handle bit fields & only for decimal type
37
31
            const char *field_name_arg,
38
32
            uint8_t dec_arg, bool zero_arg, bool unsigned_arg);
39
33
  Item_result result_type () const { return REAL_RESULT; }
40
 
  friend class CreateField;
41
 
  void make_field(SendField *);
 
34
  friend class Create_field;
 
35
  void make_field(Send_field *);
42
36
  uint32_t decimals() const { return (uint32_t) dec; }
43
37
  uint32_t size_of() const { return sizeof(*this); }
44
38
  bool eq_def(Field *field);
45
39
  int store_decimal(const my_decimal *);
46
40
  my_decimal *val_decimal(my_decimal *);
47
 
  uint32_t is_equal(CreateField *new_field);
 
41
  uint32_t is_equal(Create_field *new_field);
48
42
  int check_int(const CHARSET_INFO * const cs, const char *str, int length,
49
43
                const char *int_end, int error);
50
44
  bool get_int(const CHARSET_INFO * const cs, const char *from, uint32_t len,
52
46
               int64_t signed_min, int64_t signed_max);
53
47
};
54
48
 
55
 
} /* namespace drizzled */
56
49
 
57
 
#endif /* DRIZZLED_FIELD_NUM_H */
 
50
#endif