00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <config.h>
00022 #include <plugin/show_dictionary/dictionary.h>
00023
00024 using namespace std;
00025 using namespace drizzled;
00026
00027 ShowSchemas::ShowSchemas() :
00028 show_dictionary::Show("SHOW_SCHEMAS")
00029 {
00030 add_field("SCHEMA_NAME");
00031 }
00032
00033 ShowSchemas::Generator::Generator(Field **arg) :
00034 show_dictionary::Show::Generator(arg),
00035 schema_generator(getSession())
00036 {
00037 }
00038
00039 bool ShowSchemas::Generator::populate()
00040 {
00041 drizzled::message::schema::shared_ptr schema_ptr;
00042
00043 if (not isShowQuery())
00044 return false;
00045
00046 while ((schema_ptr= schema_generator))
00047 {
00048 if (isWild(schema_ptr->name()))
00049 continue;
00050
00051
00052 push(schema_ptr->name());
00053
00054 return true;
00055 }
00056
00057 return false;
00058 }