~drizzle-trunk/drizzle/development

1751.3.5 by Brian Aker
Add two plugins to handle the string and math functions.
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2010 Brian Aker
1759.3.26 by Stewart Smith
update copyright and author for string_functions
5
 *  Copyright (C) 2010 Stewart Smith
1751.3.5 by Brian Aker
Add two plugins to handle the string and math functions.
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  (at your option) any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program; if not, write to the Free Software
19
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
 */
21
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
22
#include <config.h>
2148.7.12 by Brian Aker
Merge in header fixes.
23
24
#include <drizzled/plugin.h>
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
25
#include <plugin/string_functions/functions.h>
1751.3.5 by Brian Aker
Add two plugins to handle the string and math functions.
26
27
using namespace drizzled;
28
29
static int init(drizzled::module::Context &context)
30
{
1759.3.21 by Stewart Smith
move ELT() function to string_functions plugin
31
  context.add(new plugin::Create_function<Item_func_elt>("elt"));
1759.3.22 by Stewart Smith
move FORMAT() function to string_functions plugin
32
  context.add(new plugin::Create_function<Item_func_format>("format"));
1759.3.28 by Stewart Smith
fix creation of Item_func_quote
33
  context.add(new plugin::Create_function<Item_func_quote>("quote"));
1976.7.1 by Brian Aker
Added compatible REGEX for Drizzle to MySQL's syntax.
34
  context.add(new plugin::Create_function<drizzled::string_functions::Regex>("regex"));
1759.3.21 by Stewart Smith
move ELT() function to string_functions plugin
35
1751.3.5 by Brian Aker
Add two plugins to handle the string and math functions.
36
  return 0;
37
}
38
39
DRIZZLE_DECLARE_PLUGIN
40
{
41
  DRIZZLE_VERSION_ID,
42
  "String Functions",
43
  "1.0",
1759.3.26 by Stewart Smith
update copyright and author for string_functions
44
  "Brian Aker, Stewart Smith",
1751.3.5 by Brian Aker
Add two plugins to handle the string and math functions.
45
  "String Functions.",
46
  PLUGIN_LICENSE_GPL,
47
  init,
48
  NULL,
49
  NULL
50
}
51
DRIZZLE_DECLARE_PLUGIN_END;