~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/function_engine/function.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-23 14:03:48 UTC
  • mto: This revision was merged to the branch mainline in revision 2349.
  • Revision ID: olafvdspek@gmail.com-20110623140348-rnees8v44f213rvv
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include <config.h>
22
 
 
 
22
#include <boost/foreach.hpp>
23
23
#include <plugin/function_engine/function.h>
24
24
#include <plugin/function_engine/cursor.h>
25
 
 
26
25
#include <string>
27
26
 
28
27
using namespace std;
34
33
                                  HTON_HAS_SCHEMA_DICTIONARY |
35
34
                                  HTON_SKIP_STORE_LOCK |
36
35
                                  HTON_TEMPORARY_NOT_SUPPORTED),
37
 
  information_message(new(message::Schema)),
38
 
  data_dictionary_message(new(message::Schema))
 
36
  information_message(new message::Schema),
 
37
  data_dictionary_message(new message::Schema)
39
38
 
40
39
{
41
40
  information_message->set_name(INFORMATION_SCHEMA_IDENTIFIER.getSchemaName());
112
111
 
113
112
bool Function::doDoesTableExist(Session&, const identifier::Table &identifier)
114
113
{
115
 
  drizzled::plugin::TableFunction *function= getFunction(identifier.getPath());
116
 
 
117
 
  if (function)
118
 
    return true;
119
 
 
120
 
  return false;
 
114
  return getFunction(identifier.getPath());
121
115
}
122
116
 
123
117
 
128
122
  set<std::string> set_of_names;
129
123
  drizzled::plugin::TableFunction::getNames(schema_identifier.getSchemaName(), set_of_names);
130
124
 
131
 
  for (set<std::string>::iterator iter= set_of_names.begin(); iter != set_of_names.end(); iter++)
 
125
  BOOST_FOREACH(const std::string& iter, set_of_names)
132
126
  {
133
 
    set_of_identifiers.push_back(identifier::Table(schema_identifier, *iter, drizzled::message::Table::FUNCTION));
 
127
    set_of_identifiers.push_back(identifier::Table(schema_identifier, iter, drizzled::message::Table::FUNCTION));
134
128
  }
135
129
}
136
130