~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/table_function.cc

  • Committer: patrick crews
  • Date: 2011-03-15 12:12:09 UTC
  • mfrom: (1099.4.216 drizzle)
  • Revision ID: gleebix@gmail.com-20110315121209-8g2tkf31w0rx9ter
Tags: 2011.03.12
Updated translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
  proto.set_type(drizzled::message::Table::FUNCTION);
41
41
  proto.set_creation_timestamp(0);
42
42
  proto.set_update_timestamp(0);
43
 
 
44
 
  proto.mutable_options()->set_dont_replicate(true);
 
43
  message::set_is_replicated(proto, false);
45
44
}
46
45
 
47
46
bool plugin::TableFunction::addPlugin(plugin::TableFunction *tool)
48
47
{
49
48
  assert(tool != NULL);
50
 
  table_functions.addFunction(tool); 
 
49
  table_functions.addFunction(tool);
51
50
  return false;
52
51
}
53
52
 
62
61
  table_functions.getNames(arg, set_of_names);
63
62
}
64
63
 
 
64
LEX& plugin::TableFunction::Generator::lex()
 
65
{
 
66
        return getSession().lex();
 
67
}
 
68
 
 
69
statement::Statement& plugin::TableFunction::Generator::statement()
 
70
{
 
71
        return *lex().statement;
 
72
}
 
73
 
65
74
plugin::TableFunction::Generator *plugin::TableFunction::generator(Field **arg)
66
75
{
67
76
  return new Generator(arg);
97
106
  field_options->set_default_null(is_default_null);
98
107
  field_constraints->set_is_notnull(not is_default_null);
99
108
 
100
 
  switch (type) 
 
109
  switch (type)
101
110
  {
102
111
  case TableFunction::STRING:
103
112
    {
224
233
 
225
234
bool plugin::TableFunction::Generator::isWild(const std::string &predicate)
226
235
{
227
 
  if (not getSession().getLex()->wild)
 
236
  if (not lex().wild)
228
237
    return false;
229
238
 
230
239
  bool match= wild_case_compare(system_charset_info,
231
240
                                predicate.c_str(),
232
 
                                getSession().getLex()->wild->ptr());
 
241
                                lex().wild->ptr());
233
242
 
234
243
  return match;
235
244
}