~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/all_tables.h

  • Committer: Stewart Smith
  • Date: 2011-01-14 05:09:22 UTC
  • mto: (2086.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2087.
  • Revision ID: stewart@flamingspork.com-20110114050922-7pouw3ppg609lgcd
add note about what uuid lib we use

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_GENERATOR_ALL_TABLES_H
22
22
#define DRIZZLED_GENERATOR_ALL_TABLES_H
23
23
 
24
 
#include <drizzled/plugin/storage_engine.h>
 
24
#include "drizzled/plugin/storage_engine.h"
25
25
 
26
26
namespace drizzled {
27
27
namespace generator {
29
29
class AllTables
30
30
{
31
31
  Session &session;
 
32
  message::table::shared_ptr table;
32
33
 
33
 
  identifier::Table::vector table_names;
34
 
  identifier::Table::vector::const_iterator table_iterator;
 
34
  TableIdentifier::vector table_names;
 
35
  TableIdentifier::vector::const_iterator table_iterator;
35
36
 
36
37
  drizzled::generator::Schema schema_generator;
37
 
  const drizzled::identifier::Schema *schema_ptr;
 
38
  const drizzled::SchemaIdentifier *schema_ptr;
38
39
 
39
40
  bool table_setup();
40
41
 
49
50
    do {
50
51
      while (table_iterator != table_names.end())
51
52
      {
52
 
        message::table::shared_ptr table;
53
 
        table= plugin::StorageEngine::getTableMessage(session, *table_iterator);
 
53
        bool is_table_parsed= plugin::StorageEngine::getTableDefinition(session, *table_iterator, table);
54
54
        table_iterator++;
55
55
 
56
 
        if (table)
 
56
        if (is_table_parsed)
57
57
          return table;
58
58
      }
59
59
    } while ((schema_ptr= schema_generator) && table_setup());
61
61
    return message::table::shared_ptr();
62
62
  }
63
63
 
64
 
  operator const drizzled::identifier::Table*()
 
64
  operator const drizzled::TableIdentifier*()
65
65
  {
66
66
    do {
67
67
      while (table_iterator != table_names.end())
68
68
      {
69
 
        const drizzled::identifier::Table *_ptr= &(*table_iterator);
 
69
        const drizzled::TableIdentifier *_ptr= &(*table_iterator);
70
70
        table_iterator++;
71
71
 
72
72
        return _ptr;