1
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2010 Sun Microsystems, Inc.
4
* Copyright (C) 2010 Sun Microsystems
6
6
* This program is free software; you can redistribute it and/or modify
7
7
* it under the terms of the GNU General Public License as published by
21
21
#ifndef PLUGIN_SCHEMA_DICTIONARY_TABLES_H
22
22
#define PLUGIN_SCHEMA_DICTIONARY_TABLES_H
24
class TablesTool : public drizzled::plugin::TableFunction
24
class TablesTool : public SchemasTool
30
30
TablesTool(const char *schema_arg, const char *table_arg) :
31
drizzled::plugin::TableFunction(schema_arg, table_arg)
31
SchemasTool(schema_arg, table_arg)
34
34
TablesTool(const char *table_arg) :
35
drizzled::plugin::TableFunction("DATA_DICTIONARY", table_arg)
35
SchemasTool(table_arg)
38
class Generator : public drizzled::plugin::TableFunction::Generator
38
class Generator : public SchemasTool::Generator
40
drizzled::generator::AllTables all_tables_generator;
41
drizzled::message::Table table_message;
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;
43
45
virtual void fill();
46
49
Generator(drizzled::Field **arg);
51
void pushRow(drizzled::message::Table::TableOptions::RowType type);
52
void pushType(drizzled::message::Table::Field::FieldType type);
50
54
const std::string &table_name()
52
return table_message.name();
56
return (*table_iterator);
55
59
const drizzled::message::Table& getTableProto()
60
const drizzled::message::Table& getTableMessage()
65
64
bool isTablesPrimed()
66
return is_tables_primed;
73
73
Generator *generator(drizzled::Field **arg)