~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/fdecimal.h

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLE_SERVER_FIELD_NEW_DECIMAL
22
22
#define DRIZZLE_SERVER_FIELD_NEW_DECIMAL
23
23
 
24
 
#include <drizzled/field/num.h>
25
 
 
26
24
/* New decimal/numeric field which use fixed point arithmetic */
27
25
class Field_new_decimal :public Field_num {
28
26
private:
35
33
    Constructors take max_length of the field as a parameter - not the
36
34
    precision as the number of decimal digits allowed.
37
35
    So for example we need to count length from precision handling
38
 
    CREATE TABLE ( DECIMAL(x,y))
 
36
    CREATE TABLE ( DECIMAL(x,y)) 
39
37
  */
40
38
  Field_new_decimal(unsigned char *ptr_arg, uint32_t len_arg, unsigned char *null_ptr_arg,
41
39
                    unsigned char null_bit_arg,
64
62
  bool zero_pack() const { return 0; }
65
63
  void sql_type(String &str) const;
66
64
  uint32_t max_display_length() { return field_length; }
67
 
  uint32_t size_of() const { return sizeof(*this); }
 
65
  uint32_t size_of() const { return sizeof(*this); } 
68
66
  uint32_t pack_length() const { return (uint32_t) bin_size; }
69
67
  uint32_t pack_length_from_metadata(uint32_t field_metadata);
70
68
  uint32_t row_pack_length() { return pack_length(); }