~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/math_functions/functions.cc

move LOG(), LOG2() and LOG10() functions into math_functions plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "plugin/math_functions/asin.h"
27
27
#include "plugin/math_functions/atan.h"
28
28
#include "plugin/math_functions/cos.h"
 
29
#include "plugin/math_functions/log.h"
29
30
 
30
31
using namespace drizzled;
31
32
 
35
36
plugin::Create_function<drizzled::Item_func_atan> *atan_function= NULL;
36
37
plugin::Create_function<drizzled::Item_func_atan> *atan2_function= NULL;
37
38
plugin::Create_function<drizzled::Item_func_cos> *cos_function= NULL;
 
39
plugin::Create_function<drizzled::Item_func_log> *log_function= NULL;
 
40
plugin::Create_function<drizzled::Item_func_log2> *log2_function= NULL;
 
41
plugin::Create_function<drizzled::Item_func_log10> *log10_function= NULL;
38
42
 
39
43
static int init(drizzled::module::Context &context)
40
44
{
44
48
  atan_function= new plugin::Create_function<Item_func_atan>("atan");
45
49
  atan2_function= new plugin::Create_function<Item_func_atan>("atan2");
46
50
  cos_function= new plugin::Create_function<Item_func_cos>("cos");
 
51
  log_function= new plugin::Create_function<Item_func_log>("log");
 
52
  log2_function= new plugin::Create_function<Item_func_log2>("log2");
 
53
  log10_function= new plugin::Create_function<Item_func_log10>("log10");
47
54
 
48
55
  context.add(abs_function);
49
56
  context.add(acos_function);
51
58
  context.add(atan_function);
52
59
  context.add(atan2_function);
53
60
  context.add(cos_function);
 
61
  context.add(log_function);
 
62
  context.add(log2_function);
 
63
  context.add(log10_function);
54
64
 
55
65
  return 0;
56
66
}