~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/math_functions/functions.cc

move POW() and POWER() function into math_functions plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "plugin/math_functions/cos.h"
29
29
#include "plugin/math_functions/log.h"
30
30
#include "plugin/math_functions/sin.h"
 
31
#include "plugin/math_functions/pow.h"
31
32
 
32
33
using namespace drizzled;
33
34
 
41
42
plugin::Create_function<drizzled::Item_func_log2> *log2_function= NULL;
42
43
plugin::Create_function<drizzled::Item_func_log10> *log10_function= NULL;
43
44
plugin::Create_function<drizzled::Item_func_sin> *sin_function= NULL;
 
45
plugin::Create_function<drizzled::Item_func_pow> *pow_function= NULL;
 
46
plugin::Create_function<drizzled::Item_func_pow> *power_function= NULL;
44
47
 
45
48
static int init(drizzled::module::Context &context)
46
49
{
54
57
  log2_function= new plugin::Create_function<Item_func_log2>("log2");
55
58
  log10_function= new plugin::Create_function<Item_func_log10>("log10");
56
59
  sin_function= new plugin::Create_function<Item_func_sin>("sin");
 
60
  pow_function= new plugin::Create_function<Item_func_pow>("pow");
 
61
  power_function= new plugin::Create_function<Item_func_pow>("power");
57
62
 
58
63
  context.add(abs_function);
59
64
  context.add(acos_function);
65
70
  context.add(log2_function);
66
71
  context.add(log10_function);
67
72
  context.add(sin_function);
 
73
  context.add(pow_function);
 
74
  context.add(power_function);
68
75
 
69
76
  return 0;
70
77
}