~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/connection_id/connection_id.cc

  • Committer: Brian Aker
  • Date: 2009-10-15 00:22:33 UTC
  • mto: (1183.1.11 merge)
  • mto: This revision was merged to the branch mainline in revision 1198.
  • Revision ID: brian@gaz-20091015002233-fa4ao2mbc67wls91
First pass of information engine. OMG, ponies... is it so much easier to
deal with creating and engine.

The list table iterator though... its ass, needs to go. We should also
abstract out share. Very few engines need a custom one. Just say'in

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <drizzled/server_includes.h>
21
21
#include <drizzled/function/math/int.h>
22
22
#include <drizzled/plugin/function.h>
23
23
#include <drizzled/session.h>
68
68
 
69
69
plugin::Create_function<ConnectionIdFunction> *connection_idudf= NULL;
70
70
 
71
 
static int initialize(module::Context &context)
 
71
static int initialize(plugin::Registry &registry)
72
72
{
73
73
  connection_idudf=
74
74
    new plugin::Create_function<ConnectionIdFunction>("connection_id");
75
 
  context.add(connection_idudf);
 
75
  registry.add(connection_idudf);
76
76
  return 0;
77
77
}
78
78
 
79
 
DRIZZLE_DECLARE_PLUGIN
80
 
{
81
 
  DRIZZLE_VERSION_ID,
 
79
static int finalize(plugin::Registry &registry)
 
80
{
 
81
   registry.remove(connection_idudf);
 
82
   delete connection_idudf;
 
83
   return 0;
 
84
}
 
85
 
 
86
drizzle_declare_plugin(connection_id)
 
87
{
82
88
  "connection_id",
83
89
  "1.0",
84
90
  "Devananda van der Veen",
85
91
  "Return the current connection_id",
86
92
  PLUGIN_LICENSE_GPL,
87
93
  initialize, /* Plugin Init */
 
94
  finalize,   /* Plugin Deinit */
 
95
  NULL,   /* status variables */
88
96
  NULL,   /* system variables */
89
97
  NULL    /* config options */
90
98
}
91
 
DRIZZLE_DECLARE_PLUGIN_END;
 
99
drizzle_declare_plugin_end;