23#include <plugin/show_dictionary/dictionary.h>
24#include <drizzled/identifier.h>
29ShowTables::ShowTables() :
30 show_dictionary::Show(
"SHOW_TABLES")
32 add_field(
"TABLE_NAME", plugin::TableFunction::STRING, MAXIMUM_IDENTIFIER_LENGTH,
false);
36 show_dictionary::Show::Generator(arg),
39 if (not isShowQuery())
44 if (not select.getShowSchema().empty())
46 schema_name.append(select.getShowSchema());
47 assert(not schema_name.empty());
51bool ShowTables::Generator::nextCore()
59 if (schema_name.empty())
65 identifier::Schema identifier(getSession().catalog().identifier(),
67 plugin::StorageEngine::getIdentifiers(getSession(), identifier, set_of_identifiers);
68 table_iterator= set_of_identifiers.begin();
72 if (table_iterator == set_of_identifiers.end())
75 if (isWild((*table_iterator).getTableName()))
81bool ShowTables::Generator::next()
83 while (not nextCore())
85 if (table_iterator != set_of_identifiers.end())
94bool ShowTables::Generator::populate()
104void ShowTables::Generator::fill()
107 push((*table_iterator).getTableName());
TODO: Rename this file - func.h is stupid.