My Project
|
#include <item_create.h>
Public Member Functions | |
virtual Item * | create_func (THD *thd, LEX_STRING name, List< Item > *item_list)=0 |
Protected Member Functions | |
Create_func () | |
virtual | ~Create_func () |
Public function builder interface. The parser (sql/sql_yacc.yy) uses a factory / builder pattern to construct an Item
object for each function call. All the concrete function builders implements this interface, either directly or indirectly with some adapter helpers. Keeping the function creation separated from the bison grammar allows to simplify the parser, and avoid the need to introduce a new token for each function, which has undesirable side effects in the grammar.
Create_func::Create_func | ( | ) | [inline, protected] |
Constructor
virtual Create_func::~Create_func | ( | ) | [inline, protected, virtual] |
Destructor
virtual Item* Create_func::create_func | ( | THD * | thd, |
LEX_STRING | name, | ||
List< Item > * | item_list | ||
) | [pure virtual] |
The builder create method. Given the function name and list or arguments, this method creates an Item
that represents the function call. In case or errors, a NULL item is returned, and an error is reported. Note that the thd
object may be modified by the builder. In particular, the following members/methods can be set/called, depending on the function called and the function possible side effects.
thd->lex->binlog_row_based_if_mixed
thd->lex->current_context()
thd->lex->safe_to_cache_query
thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT)
thd->lex->uncacheable(UNCACHEABLE_RAND)
thd->lex->add_time_zone_tables_to_query_tables(thd)
thd | The current thread |
name | The function name |
item_list | The list of arguments to the function, can be NULL |
Implemented in Create_func_no_geom, Create_func_arg3, Create_func_arg2, Create_func_arg1, Create_qfunc, Create_func_arg0, and Create_native_func.