Drizzled Public API Documentation

functions.cc

00001 /* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2010 Brian Aker
00005  *  Copyright (C) 2010 Stewart Smith
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00022 #include <config.h>
00023 
00024 #include <drizzled/plugin.h>
00025 #include <plugin/utility_functions/functions.h>
00026 
00027 using namespace drizzled;
00028 
00029 static int init(drizzled::module::Context &context)
00030 {
00031   context.add(new plugin::Create_function<utility_functions::Assert>("assert"));
00032   context.add(new plugin::Create_function<utility_functions::BitCount>("bit_count"));
00033   context.add(new plugin::Create_function<utility_functions::Catalog>("catalog"));
00034   context.add(new plugin::Create_function<utility_functions::Execute>("execute"));
00035   context.add(new plugin::Create_function<utility_functions::GlobalReadLock>("global_read_lock"));
00036   context.add(new plugin::Create_function<utility_functions::ResultType>("result_type"));
00037   context.add(new plugin::Create_function<utility_functions::Kill>("kill"));
00038   context.add(new plugin::Create_function<utility_functions::Schema>("database"));
00039   context.add(new plugin::Create_function<utility_functions::Typeof>("typeof"));
00040   context.add(new plugin::Create_function<utility_functions::User>("user"));
00041 
00042   return 0;
00043 }
00044 
00045 DRIZZLE_DECLARE_PLUGIN
00046 {
00047   DRIZZLE_VERSION_ID,
00048   "Utility Functions",
00049   "1.4",
00050   "Brian Aker, Stewart Smith",
00051   "Utility Functions.",
00052   PLUGIN_LICENSE_GPL,
00053   init,
00054   NULL,
00055   NULL
00056 }
00057 DRIZZLE_DECLARE_PLUGIN_END;