23 #include <plugin/show_dictionary/dictionary.h>
24 #include <drizzled/identifier.h>
27 using namespace drizzled;
29 ShowTables::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());
51 bool ShowTables::Generator::nextCore()
59 if (schema_name.empty())
66 plugin::StorageEngine::getIdentifiers(getSession(), identifier, set_of_identifiers);
67 table_iterator= set_of_identifiers.begin();
71 if (table_iterator == set_of_identifiers.end())
74 if (isWild((*table_iterator).getTableName()))
80 bool ShowTables::Generator::next()
82 while (not nextCore())
84 if (table_iterator != set_of_identifiers.end())
93 bool ShowTables::Generator::populate()
103 void ShowTables::Generator::fill()
106 push((*table_iterator).getTableName());