~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/show_dictionary/show_tables.cc

Merge Joe, plus I updated the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include "config.h"
23
23
#include "plugin/show_dictionary/dictionary.h"
24
 
#include "drizzled/identifier.h"
 
24
#include "drizzled/table_identifier.h"
25
25
 
26
26
using namespace std;
27
27
using namespace drizzled;
28
28
 
29
29
ShowTables::ShowTables() :
30
 
  show_dictionary::Show("SHOW_TABLES")
 
30
  plugin::TableFunction("DATA_DICTIONARY", "SHOW_TABLES")
31
31
{
32
32
  add_field("TABLE_NAME");
33
33
}
34
34
 
35
35
ShowTables::Generator::Generator(drizzled::Field **arg) :
36
 
  show_dictionary::Show::Generator(arg),
 
36
  drizzled::plugin::TableFunction::Generator(arg),
37
37
  is_primed(false)
38
38
{
39
 
  if (not isShowQuery())
40
 
   return;
41
 
 
42
 
  statement::Show *select= static_cast<statement::Show *>(getSession().lex->statement);
 
39
  statement::Select *select= static_cast<statement::Select *>(getSession().lex->statement);
43
40
 
44
41
  if (not select->getShowSchema().empty())
45
42
  {
62
59
      return false;
63
60
    }
64
61
 
65
 
    identifier::Schema identifier(schema_name);
66
 
    plugin::StorageEngine::getIdentifiers(getSession(), identifier, set_of_identifiers);
 
62
    SchemaIdentifier identifier(schema_name);
 
63
    plugin::StorageEngine::getTableIdentifiers(getSession(), identifier, set_of_identifiers);
67
64
    table_iterator= set_of_identifiers.begin();
68
65
    is_primed= true;
69
66
  }