~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/table.h

  • Committer: tdavies
  • Date: 2010-10-02 04:28:26 UTC
  • mto: (1813.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1814.
  • Revision ID: tdavies@molly-20101002042826-n7s0ywccicg7nnk9
In .../drizzled/structs.h: Changed C structs KeyPartInfo, KeyInfo, and RegInfo to C++ classes

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
class Table
31
31
{
32
32
  Session &session;
33
 
  message::table::shared_ptr table;
 
33
  message::Table table;
34
34
 
35
 
  TableIdentifier::vector table_names;
36
 
  TableIdentifier::vector::const_iterator table_iterator;
 
35
  TableIdentifiers table_names;
 
36
  TableIdentifiers::const_iterator table_iterator;
37
37
 
38
38
public:
39
39
 
40
40
  Table(Session &arg, const SchemaIdentifier &schema_identifier);
41
41
 
42
 
  operator const drizzled::message::table::shared_ptr()
 
42
  operator const drizzled::message::Table*()
43
43
  {
44
44
    while (table_iterator != table_names.end())
45
45
    {
46
 
      table->Clear();
 
46
      table.Clear();
47
47
      bool is_table_parsed= plugin::StorageEngine::getTableDefinition(session, *table_iterator, table);
48
48
      table_iterator++;
49
49
 
50
50
      if (is_table_parsed)
51
 
        return table;
 
51
        return &table;
52
52
    }
53
53
 
54
 
    return message::table::shared_ptr();
 
54
    return NULL;
55
55
  }
56
56
 
57
57
  operator const drizzled::TableIdentifier*()