~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2008 Sun Microsystems
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; version 2 of the License.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 */
1 by brian
clean slate
19
20
/* This file defines structures needed by udf functions */
21
22
139.1.8 by Stewart Smith
UDFs are now normal Item_func objects. Simplifies handling them a lot.
23
#include "item_func.h"
24
1 by brian
clean slate
25
enum Item_udftype {UDFTYPE_FUNCTION=1,UDFTYPE_AGGREGATE};
26
139.1.8 by Stewart Smith
UDFs are now normal Item_func objects. Simplifies handling them a lot.
27
typedef Item_func* (*create_func_item)(MEM_ROOT*);
1 by brian
clean slate
28
139.1.8 by Stewart Smith
UDFs are now normal Item_func objects. Simplifies handling them a lot.
29
struct udf_func
1 by brian
clean slate
30
{
31
  LEX_STRING name;
139.1.8 by Stewart Smith
UDFs are now normal Item_func objects. Simplifies handling them a lot.
32
  create_func_item create_func;
1 by brian
clean slate
33
};
34
35
void udf_init(void),udf_free(void);
482 by Brian Aker
Remove uint.
36
udf_func *find_udf(const char *name, uint32_t len=0);
1 by brian
clean slate
37
void free_udf(udf_func *udf);
38
int mysql_create_function(THD *thd,udf_func *udf);