~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/data_engine/function.h

Updates for table functions to insert tables into additional schemas;

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
{
59
59
  typedef drizzled::hash_map<std::string, Tool *> ToolMap;
60
60
  typedef std::pair<std::string, Tool&> ToolMapPair;
 
61
  typedef std::set<std::string> SchemaList;
61
62
 
62
63
  ToolMap table_map;
 
64
  SchemaList schema_list;
63
65
 
64
66
  CharacterSetsTool character_sets;
65
67
  CollationsTool collations;
83
85
  void addTool(Tool& tool)
84
86
  {
85
87
    std::pair<ToolMap::iterator, bool> ret;
86
 
 
87
 
    ret= table_map.insert(make_pair(tool.getPath(),
88
 
                                    &tool));
 
88
    std::string schema= tool.getSchemaHome();
 
89
    std::string path= tool.getPath();
 
90
 
 
91
    transform(path.begin(), path.end(),
 
92
              path.begin(), ::tolower);
 
93
 
 
94
    transform(schema.begin(), schema.end(),
 
95
              schema.begin(), ::tolower);
 
96
 
 
97
    schema_list.insert(schema);
 
98
 
 
99
    ret= table_map.insert(std::make_pair(path, &tool));
89
100
    assert(ret.second == true);
90
101
  }
91
102