~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-06-19 20:17:46 UTC
  • mto: This revision was merged to the branch mainline in revision 1067.
  • Revision ID: osullivan.padraig@gmail.com-20090619201746-sw9j9hkqshv9hv5k
Converted the ST_FIELDS_INFO structure to a class named FieldInfo. Made all
data members of this class private and provided getters for every data
member. No setters are needed since this data is never modified once a field
is created. Updated the appropriate files which use FieldInfo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
550
550
  List<LEX_STRING> referenced_fields;
551
551
} FOREIGN_KEY_INFO;
552
552
 
553
 
typedef struct st_field_info
554
 
{
555
 
  /**
556
 
      This is used as column name.
557
 
  */
558
 
  const char* field_name;
559
 
  /**
560
 
     For string-type columns, this is the maximum number of
561
 
     characters. Otherwise, it is the 'display-length' for the column.
562
 
  */
563
 
  uint32_t field_length;
564
 
  /**
565
 
     This denotes data type for the column. For the most part, there seems to
566
 
     be one entry in the enum for each SQL data type, although there seem to
567
 
     be a number of additional entries in the enum.
568
 
  */
569
 
  enum enum_field_types field_type;
570
 
  int value;
571
 
  /**
572
 
     This is used to set column attributes. By default, columns are @c NOT
573
 
     @c NULL and @c SIGNED, and you can deviate from the default
574
 
     by setting the appopriate flags. You can use either one of the flags
575
 
     @c MY_I_S_MAYBE_NULL and @cMY_I_S_UNSIGNED or
576
 
     combine them using the bitwise or operator @c |. Both flags are
577
 
     defined in table.h.
578
 
   */
579
 
  uint32_t field_flags;        // Field atributes(maybe_null, signed, unsigned etc.)
580
 
  const char* old_name;
581
 
  /**
582
 
     This should be one of @c SKIP_OPEN_TABLE,
583
 
     @c OPEN_FRM_ONLY or @c OPEN_FULL_TABLE.
584
 
  */
585
 
  uint32_t open_method;
586
 
} ST_FIELD_INFO;
587
553
 
588
554
 
589
555
class TableList;