#include <sql_udf.h>
Inheritance diagram for udf_handler:


Public Member Functions | |
| udf_handler (udf_func *udf_arg) | |
| ~udf_handler () | |
| const char * | name () const |
| Item_result | result_type () const |
| bool | get_arguments () |
| bool | fix_fields (THD *thd, Item_result_field *item, uint arg_count, Item **args) |
| void | cleanup () |
| double | val (my_bool *null_value) |
| longlong | val_int (my_bool *null_value) |
| my_decimal * | val_decimal (my_bool *null_value, my_decimal *dec_buf) |
| void | clear () |
| void | add (my_bool *null_value) |
| String * | val_str (String *str, String *save_str) |
Public Attributes | |
| table_map | used_tables_cache |
| bool | const_item_cache |
| bool | not_original |
Protected Attributes | |
| udf_func * | u_d |
| String * | buffers |
| UDF_ARGS | f_args |
| UDF_INIT | initid |
| char * | num_buffer |
| uchar | error |
| uchar | is_null |
| bool | initialized |
| Item ** | args |
Definition at line 53 of file sql_udf.h.
| udf_handler::udf_handler | ( | udf_func * | udf_arg | ) | [inline] |
Definition at line 69 of file sql_udf.h.
00069 :u_d(udf_arg), buffers(0), error(0), 00070 is_null(0), initialized(0), not_original(0) 00071 {}
| udf_handler::~udf_handler | ( | ) |
| void udf_handler::add | ( | my_bool * | null_value | ) | [inline] |
Definition at line 123 of file sql_udf.h.
References error, f_args, func, st_udf_func::func_add, get_arguments(), initid, is_null, and u_d.
00124 { 00125 if (get_arguments()) 00126 { 00127 *null_value=1; 00128 return; 00129 } 00130 Udf_func_add func= u_d->func_add; 00131 func(&initid, &f_args, &is_null, &error); 00132 *null_value= (my_bool) (is_null || error); 00133 }
Here is the call graph for this function:

| void udf_handler::cleanup | ( | ) |
| void udf_handler::clear | ( | ) | [inline] |
| bool udf_handler::fix_fields | ( | THD * | thd, | |
| Item_result_field * | item, | |||
| uint | arg_count, | |||
| Item ** | args | |||
| ) |
| bool udf_handler::get_arguments | ( | ) |
Definition at line 2956 of file item_func.cc.
Referenced by add(), val(), and val_int().
Here is the caller graph for this function:

| const char* udf_handler::name | ( | ) | const [inline] |
| Item_result udf_handler::result_type | ( | ) | const [inline] |
Definition at line 74 of file sql_udf.h.
References st_udf_func::returns, STRING_RESULT, and u_d.
00075 { return u_d ? u_d->returns : STRING_RESULT;}
| double udf_handler::val | ( | my_bool * | null_value | ) | [inline] |
Definition at line 80 of file sql_udf.h.
References error, f_args, st_udf_func::func, func, get_arguments(), initid, is_null, and u_d.
00081 { 00082 is_null= 0; 00083 if (get_arguments()) 00084 { 00085 *null_value=1; 00086 return 0.0; 00087 } 00088 Udf_func_double func= (Udf_func_double) u_d->func; 00089 double tmp=func(&initid, &f_args, &is_null, &error); 00090 if (is_null || error) 00091 { 00092 *null_value=1; 00093 return 0.0; 00094 } 00095 *null_value=0; 00096 return tmp; 00097 }
Here is the call graph for this function:

| my_decimal* udf_handler::val_decimal | ( | my_bool * | null_value, | |
| my_decimal * | dec_buf | |||
| ) |
Definition at line 98 of file sql_udf.h.
References error, f_args, st_udf_func::func, func, get_arguments(), initid, is_null, LL, and u_d.
00099 { 00100 is_null= 0; 00101 if (get_arguments()) 00102 { 00103 *null_value=1; 00104 return LL(0); 00105 } 00106 Udf_func_longlong func= (Udf_func_longlong) u_d->func; 00107 longlong tmp=func(&initid, &f_args, &is_null, &error); 00108 if (is_null || error) 00109 { 00110 *null_value=1; 00111 return LL(0); 00112 } 00113 *null_value=0; 00114 return tmp; 00115 }
Here is the call graph for this function:

Item** udf_handler::args [protected] |
String* udf_handler::buffers [protected] |
uchar udf_handler::error [protected] |
UDF_ARGS udf_handler::f_args [protected] |
bool udf_handler::initialized [protected] |
UDF_INIT udf_handler::initid [protected] |
uchar udf_handler::is_null [protected] |
char* udf_handler::num_buffer [protected] |
udf_func* udf_handler::u_d [protected] |
1.4.7

