~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/syslog/function.cc

  • Committer: Monty Taylor
  • Date: 2010-12-02 22:51:54 UTC
  • mto: (1975.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1976.
  • Revision ID: mordred@inaugust.com-20101202225154-h54ifmga9x6cckgs
Refactored syslog module and changed it to use sys_var directly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "function.h"
26
26
#include "wrap.h"
27
27
 
28
 
using namespace drizzled;
 
28
namespace drizzle_plugin
 
29
{
29
30
 
30
 
Function_syslog::Function_syslog()
 
31
udf::Syslog::Syslog()
31
32
  : Item_str_func()
32
 
{
33
 
  WrapSyslog::singleton().openlog(syslog_module::sysvar_ident);
34
 
}
 
33
{ }
35
34
 
36
 
String *Function_syslog::val_str(String *s)
 
35
drizzled::String *udf::Syslog::val_str(drizzled::String *s)
37
36
{
38
37
 
39
38
  if (args[0]->null_value || args[1]->null_value || args[2]->null_value)
64
63
  return args[2]->val_str(s);
65
64
}
66
65
 
67
 
void Function_syslog::fix_length_and_dec()
 
66
void udf::Syslog::fix_length_and_dec()
68
67
{
69
68
  max_length= args[0]->max_length;
70
69
}
71
70
 
72
 
bool Function_syslog::check_argument_count(int n)
 
71
bool udf::Syslog::check_argument_count(int n)
73
72
{
74
73
  return (n == 3);
75
74
}
76
75
 
 
76
} /* namespace drizzle_plugin */