~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_udf.h

  • Committer: Brian Aker
  • Date: 2009-05-11 17:50:22 UTC
  • Revision ID: brian@gaz-20090511175022-y35q9ky6uh9ldcjt
Replacing Sun employee copyright headers (aka... anything done by a Sun
employee is copyright by Sun).

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
#ifndef DRIZZLED_SQL_UDF_H
 
21
#define DRIZZLED_SQL_UDF_H
 
22
 
20
23
/* This file defines structures needed by udf functions */
21
24
 
22
 
#ifdef USE_PRAGMA_INTERFACE
23
 
#pragma interface
24
 
#endif
 
25
#include <drizzled/function/func.h>
 
26
#include <drizzled/function/create.h>
25
27
 
26
 
#include "item_func.h"
 
28
#include <stdint.h>
27
29
 
28
30
enum Item_udftype {UDFTYPE_FUNCTION=1,UDFTYPE_AGGREGATE};
29
31
 
30
 
typedef Item_func* (*create_func_item)(MEM_ROOT*);
31
 
 
32
 
struct udf_func
33
 
{
34
 
  LEX_STRING name;
35
 
  create_func_item create_func;
36
 
};
37
 
 
38
 
void udf_init(void),udf_free(void);
39
 
udf_func *find_udf(const char *name, uint32_t len=0);
40
 
void free_udf(udf_func *udf);
41
 
int mysql_create_function(THD *thd,udf_func *udf);
 
32
Function_builder *find_udf(const char *name, uint32_t len=0);
 
33
void free_udf(Function_builder *udf);
 
34
int mysql_create_function(Session *session,Function_builder *udf);
 
35
void add_udf(Function_builder *udf);
 
36
void remove_udf(Function_builder *udf);
 
37
 
 
38
#endif /* DRIZZLED_SQL_UDF_H */