~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/table.h

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
mergeĀ lp:~olafvdspek/drizzle/refactor4

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
 
#ifndef DRIZZLED_GENERATOR_TABLE_H
22
 
#define DRIZZLED_GENERATOR_TABLE_H
 
21
#pragma once
23
22
 
24
 
#include "drizzled/plugin/storage_engine.h"
 
23
#include <drizzled/plugin/storage_engine.h>
25
24
 
26
25
namespace drizzled {
27
 
 
28
 
class Session;
29
 
 
30
26
namespace generator {
31
27
 
32
28
class Table
33
29
{
34
30
  Session &session;
35
 
  message::table::shared_ptr table;
36
31
 
37
 
  identifier::Table::vector table_names;
38
 
  identifier::Table::vector::const_iterator table_iterator;
 
32
  identifier::table::vector table_names;
 
33
  identifier::table::vector::const_iterator table_iterator;
39
34
 
40
35
public:
41
36
 
45
40
  {
46
41
    while (table_iterator != table_names.end())
47
42
    {
48
 
      table->Clear();
49
 
      bool is_table_parsed= plugin::StorageEngine::getTableDefinition(session, *table_iterator, table);
 
43
      message::table::shared_ptr table;
 
44
      table= plugin::StorageEngine::getTableMessage(session, *table_iterator);
50
45
      table_iterator++;
51
46
 
52
 
      if (is_table_parsed)
 
47
      if (table)
53
48
        return table;
54
49
    }
55
50
 
73
68
} /* namespace generator */
74
69
} /* namespace drizzled */
75
70
 
76
 
#endif /* DRIZZLED_GENERATOR_TABLE_H */