~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/md5/md5.cc

  • Committer: Monty Taylor
  • Date: 2009-08-17 20:54:05 UTC
  • mto: (1115.3.12 captain)
  • mto: This revision was merged to the branch mainline in revision 1121.
  • Revision ID: mordred@inaugust.com-20090817205405-xogz4uoii3c2co4c
Moved UDFs to slot organization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
16
16
 
17
17
#include <drizzled/server_includes.h>
18
 
#include <drizzled/sql_udf.h>
 
18
#include <drizzled/slot/function.h>
19
19
#include <drizzled/item/func.h>
20
20
#include <drizzled/function/str/strfunc.h>
21
21
 
28
28
#include <stdio.h>
29
29
 
30
30
using namespace std;
 
31
using namespace drizzled;
31
32
 
32
33
class Md5Function : public Item_str_func
33
34
{
87
88
}
88
89
 
89
90
 
90
 
Create_function<Md5Function> md5udf(string("md5"));
 
91
plugin::Create_function<Md5Function> *md5udf= NULL;
91
92
 
92
 
static int initialize(drizzled::plugin::Registry &registry)
 
93
static int initialize(plugin::Registry &registry)
93
94
{
94
 
  registry.add(&md5udf);
 
95
  md5udf= new plugin::Create_function<Md5Function>("md5");
 
96
  registry.function.add(md5udf);
95
97
  return 0;
96
98
}
97
99
 
98
 
static int finalize(drizzled::plugin::Registry &registry)
 
100
static int finalize(plugin::Registry &registry)
99
101
{
100
 
   registry.remove(&md5udf);
101
 
   return 0;
 
102
  registry.function.remove(md5udf);
 
103
  delete md5udf;
 
104
  return 0;
102
105
}
103
106
 
104
107
drizzle_declare_plugin(md5)