~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/all_tables.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#pragma once
 
21
#ifndef DRIZZLED_GENERATOR_ALL_TABLES_H
 
22
#define DRIZZLED_GENERATOR_ALL_TABLES_H
22
23
 
23
 
#include <drizzled/plugin/storage_engine.h>
 
24
#include "drizzled/plugin/storage_engine.h"
24
25
 
25
26
namespace drizzled {
26
27
namespace generator {
28
29
class AllTables
29
30
{
30
31
  Session &session;
 
32
  message::table::shared_ptr table;
31
33
 
32
 
  identifier::table::vector table_names;
33
 
  identifier::table::vector::const_iterator table_iterator;
 
34
  identifier::Table::vector table_names;
 
35
  identifier::Table::vector::const_iterator table_iterator;
34
36
 
35
37
  drizzled::generator::Schema schema_generator;
36
38
  const drizzled::identifier::Schema *schema_ptr;
48
50
    do {
49
51
      while (table_iterator != table_names.end())
50
52
      {
51
 
        message::table::shared_ptr table;
52
 
        table= plugin::StorageEngine::getTableMessage(session, *table_iterator);
 
53
        bool is_table_parsed= plugin::StorageEngine::getTableDefinition(session, *table_iterator, table);
53
54
        table_iterator++;
54
55
 
55
 
        if (table)
 
56
        if (is_table_parsed)
56
57
          return table;
57
58
      }
58
59
    } while ((schema_ptr= schema_generator) && table_setup());
79
80
} /* namespace generator */
80
81
} /* namespace drizzled */
81
82
 
 
83
#endif /* DRIZZLED_GENERATOR_ALL_TABLES_H */