Drizzled Public API Documentation

drizzled::Create_func Class Reference

#include <create.h>

Inheritance diagram for drizzled::Create_func:
drizzled::Create_func_arg0 drizzled::Create_func_arg1 drizzled::Create_func_arg2 drizzled::Create_func_arg3 drizzled::Create_native_func drizzled::Create_qfunc drizzled::Create_udf_func drizzled::Create_func_found_rows drizzled::Create_func_pi drizzled::Create_func_row_count drizzled::Create_func_bin drizzled::Create_func_cot drizzled::Create_func_dayname drizzled::Create_func_dayofmonth drizzled::Create_func_dayofweek drizzled::Create_func_dayofyear drizzled::Create_func_degrees drizzled::Create_func_from_days drizzled::Create_func_isnull drizzled::Create_func_last_day drizzled::Create_func_lcase drizzled::Create_func_load_file drizzled::Create_func_ltrim drizzled::Create_func_monthname drizzled::Create_func_oct drizzled::Create_func_radians drizzled::Create_func_rtrim drizzled::Create_func_sign drizzled::Create_func_space drizzled::Create_func_tan drizzled::Create_func_time_to_sec drizzled::Create_func_to_days drizzled::Create_func_ucase drizzled::Create_func_weekday drizzled::Create_func_date_format drizzled::Create_func_datediff drizzled::Create_func_decode drizzled::Create_func_find_in_set drizzled::Create_func_ifnull drizzled::Create_func_instr drizzled::Create_func_makedate drizzled::Create_func_name_const drizzled::Create_func_nullif drizzled::Create_func_period_add drizzled::Create_func_period_diff drizzled::Create_func_strcmp drizzled::Create_func_time_format drizzled::Create_func_conv drizzled::Create_func_lpad drizzled::Create_func_rpad drizzled::Create_func_concat drizzled::Create_func_concat_ws drizzled::Create_func_export_set drizzled::Create_func_field drizzled::Create_func_from_unixtime drizzled::Create_func_greatest drizzled::Create_func_last_insert_id drizzled::Create_func_least drizzled::Create_func_locate drizzled::Create_func_make_set drizzled::Create_func_round drizzled::Create_func_unix_timestamp

List of all members.

Public Member Functions

virtual Itemcreate (Session *session, LEX_STRING name, List< Item > *item_list)=0

Protected Member Functions

 Create_func ()
virtual ~Create_func ()

Detailed Description

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.

Definition at line 41 of file create.h.


Constructor & Destructor Documentation

drizzled::Create_func::Create_func ( ) [inline, protected]

Constructor

Definition at line 69 of file create.h.

virtual drizzled::Create_func::~Create_func ( ) [inline, protected, virtual]

Destructor

Definition at line 71 of file create.h.


Member Function Documentation

virtual Item* drizzled::Create_func::create ( Session session,
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 session 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.

  • session->lex().binlog_row_based_if_mixed
  • session->lex().current_context()
  • session->lex().safe_to_cache_query
  • session->lex().uncacheable(UNCACHEABLE_SIDEEFFECT)
  • session->lex().uncacheable(UNCACHEABLE_RAND)
  • session->lex().add_time_zone_tables_to_query_tables(session)
Parameters:
sessionThe current thread
nameThe function name
item_listThe list of arguments to the function, can be NULL
Returns:
An item representing the parsed function call, or NULL

Implemented in drizzled::Create_native_func, drizzled::Create_func_arg0, drizzled::Create_func_arg1, drizzled::Create_func_arg2, drizzled::Create_func_arg3, drizzled::Create_qfunc, and drizzled::Create_udf_func.


The documentation for this class was generated from the following file: