~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_dictionary/tables.h

  • Committer: Brian Aker
  • Date: 2010-11-08 18:24:58 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108182458-twv4hyix43ojno80
Merge in changes such that lock is now broken out into its own directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef PLUGIN_SCHEMA_DICTIONARY_TABLES_H
22
22
#define PLUGIN_SCHEMA_DICTIONARY_TABLES_H
23
23
 
24
 
class TablesTool : public SchemasTool
 
24
class TablesTool : public drizzled::plugin::TableFunction
25
25
{
26
26
public:
27
27
 
28
28
  TablesTool();
29
29
 
30
30
  TablesTool(const char *schema_arg, const char *table_arg) :
31
 
    SchemasTool(schema_arg, table_arg)
 
31
    drizzled::plugin::TableFunction(schema_arg, table_arg)
32
32
  { }
33
33
 
34
34
  TablesTool(const char *table_arg) :
35
 
    SchemasTool(table_arg)
 
35
    drizzled::plugin::TableFunction("DATA_DICTIONARY", table_arg)
36
36
  { }
37
37
 
38
 
  class Generator : public SchemasTool::Generator 
 
38
  class Generator : public drizzled::plugin::TableFunction::Generator 
39
39
  {
40
 
    drizzled::message::Table table_proto;
41
 
    std::set<std::string> table_names;
42
 
    std::set<std::string>::iterator table_iterator;
43
 
    bool is_tables_primed;
 
40
    drizzled::generator::AllTables all_tables_generator;
 
41
    drizzled::message::Table table_message;
44
42
 
45
43
    virtual void fill();
46
 
    bool nextTableCore();
47
44
 
48
45
  public:
49
46
    Generator(drizzled::Field **arg);
50
47
 
51
 
    void pushRow(drizzled::message::Table::TableOptions::RowType type);
52
 
    void pushType(drizzled::message::Table::Field::FieldType type);
 
48
    bool nextTable();
53
49
 
54
50
    const std::string &table_name()
55
51
    {
56
 
      return (*table_iterator);
 
52
      return table_message.name();
57
53
    }
58
54
 
59
55
    const drizzled::message::Table& getTableProto()
60
56
    {
61
 
      return table_proto;
 
57
      return table_message;
 
58
    }
 
59
 
 
60
    const drizzled::message::Table& getTableMessage()
 
61
    {
 
62
      return table_message;
62
63
    }
63
64
 
64
65
    bool isTablesPrimed()
65
66
    {
66
 
      return is_tables_primed;
 
67
      return true;
67
68
    }
68
69
 
69
70
    bool populate();
70
 
    bool nextTable();
71
71
  };
72
72
 
73
73
  Generator *generator(drizzled::Field **arg)