~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.h

  • Committer: devananda
  • Date: 2009-06-30 14:27:54 UTC
  • mfrom: (1030.2.4 trunk)
  • mto: (1093.1.7 captain)
  • mto: This revision was merged to the branch mainline in revision 1095.
  • Revision ID: devananda.vdv@gmail.com-20090630142754-vm9w374yxkf1pikc
mergeĀ fromĀ lp

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;
590
 
typedef class Item COND;
591
 
 
592
 
struct InfoSchemaTable
593
 
{
594
 
  const char* table_name;
595
 
  ST_FIELD_INFO *fields_info;
596
 
  /* Create information_schema table */
597
 
  Table *(*create_table)  (Session *session, TableList *table_list);
598
 
  /* Fill table with data */
599
 
  int (*fill_table) (Session *session, TableList *tables, COND *cond);
600
 
  /* Handle fileds for old SHOW */
601
 
  int (*old_format) (Session *session, struct InfoSchemaTable *schema_table);
602
 
  int (*process_table) (Session *session, TableList *tables, Table *table,
603
 
                        bool res, LEX_STRING *db_name, LEX_STRING *table_name);
604
 
  int idx_field1, idx_field2;
605
 
  bool hidden;
606
 
  uint32_t i_s_requested_object;  /* the object we need to open(Table | VIEW) */
607
 
};
608
556
 
609
557
#define JOIN_TYPE_LEFT  1
610
558
#define JOIN_TYPE_RIGHT 2