![]() |
MySQL 9.2.0
Source Code Documentation
|
Functions to create an item. More...
#include "sql/item_create.h"
#include <errno.h>
#include <limits.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <algorithm>
#include <cctype>
#include <iterator>
#include <limits>
#include <new>
#include <string>
#include <unordered_map>
#include <utility>
#include "decimal.h"
#include "field_types.h"
#include "m_string.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "my_time.h"
#include "mysql/strings/dtoa.h"
#include "mysql/strings/m_ctype.h"
#include "mysql/strings/my_strtoll10.h"
#include "mysql/udf_registration_types.h"
#include "mysql_time.h"
#include "mysqld_error.h"
#include "sql-common/my_decimal.h"
#include "sql/item.h"
#include "sql/item_cmpfunc.h"
#include "sql/item_func.h"
#include "sql/item_geofunc.h"
#include "sql/item_gtid_func.h"
#include "sql/item_inetfunc.h"
#include "sql/item_json_func.h"
#include "sql/item_pfs_func.h"
#include "sql/item_regexp_func.h"
#include "sql/item_strfunc.h"
#include "sql/item_sum.h"
#include "sql/item_timefunc.h"
#include "sql/item_xmlfunc.h"
#include "sql/parse_location.h"
#include "sql/parse_tree_helpers.h"
#include "sql/parser_yystype.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_error.h"
#include "sql/sql_exception_handler.h"
#include "sql/sql_lex.h"
#include "sql/sql_time.h"
#include "sql/sql_udf.h"
#include "sql/system_variables.h"
#include "sql_string.h"
#include "tztime.h"
Namespaces | |
namespace | anonymous_namespace{item_create.cc} |
Macros | |
#define | SQL_FN(F, N) &Function_factory<Instantiator<F, N>>::s_singleton |
Shorthand macro to reference the singleton instance. More... | |
#define | SQL_FACTORY(INSTANTIATOR) &Function_factory<INSTANTIATOR>::s_singleton |
Shorthand macro to reference the singleton instance when there is a specialized instantiator. More... | |
#define | SQL_FN_V(F, MIN, MAX) &Function_factory<Instantiator<F, MIN, MAX>>::s_singleton |
Use this macro if you want to instantiate the Item_func object like Item_func_xxx::Item_func_xxx(pos, args[0], ..., args[MAX]) More... | |
#define | SQL_FN_V_THD(F, MIN, MAX) &Function_factory<Instantiator_with_thd<F, MIN, MAX>>::s_singleton |
Use this macro if you want to instantiate the Item_func object like Item_func_xxx::Item_func_xxx(thd, pos, args[0], ..., args[MAX]) More... | |
#define | SQL_FN_V_LIST(F, MIN, MAX) &Function_factory<List_instantiator<F, MIN, MAX>>::s_singleton |
Use this macro if you want to instantiate the Item_func object like Item_func_xxx::Item_func_xxx(pos, item_list) More... | |
#define | SQL_FN_LIST(F, N) &Function_factory<List_instantiator<F, N>>::s_singleton |
Use this macro if you want to instantiate the Item_func object like Item_func_xxx::Item_func_xxx(pos, item_list) More... | |
#define | SQL_FN_V_LIST_THD(F, MIN, MAX) &Function_factory<List_instantiator_with_thd<F, MIN, MAX>>::s_singleton |
Use this macro if you want to instantiate the Item_func object like Item_func_xxx::Item_func_xxx(thd, pos, item_list) More... | |
#define | SQL_FN_ODD(F, MIN, MAX) |
Just like SQL_FN_V_THD, but enforces a check that the argument count is odd. More... | |
#define | SQL_FN_EVEN(F, MIN, MAX) |
Just like SQL_FN_V_THD, but enforces a check that the argument count is even. More... | |
#define | SQL_FN_INTERNAL(F, N) &Internal_function_factory<Instantiator<F, N>>::s_singleton |
Like SQL_FN, but for functions that may only be referenced from system views. More... | |
#define | SQL_FN_INTERNAL_V(F, MIN, MAX) &Internal_function_factory<Instantiator<F, MIN, MAX>>::s_singleton |
Just like SQL_FN_INTERNAL, but enforces a check that the argument count is even. More... | |
#define | SQL_FN_LIST_INTERNAL(F, N) &Internal_function_factory<List_instantiator<F, N>>::s_singleton |
Like SQL_FN_LIST, but for functions that may only be referenced from system views. More... | |
#define | SQL_FN_LIST_INTERNAL_V(F, MIN, MAX) &Internal_function_factory<List_instantiator<F, MIN, MAX>>::s_singleton |
Like SQL_FN_LIST, but enforces a check that the argument count is within the range specified. More... | |
Functions | |
uint | anonymous_namespace{item_create.cc}::arglist_length (const PT_item_list *args) |
bool | anonymous_namespace{item_create.cc}::check_argcount_bounds (THD *, LEX_STRING function_name, PT_item_list *item_list, uint min_argcount, uint max_argcount) |
bool | item_create_init () |
Load the hash table for native functions. More... | |
void | item_create_cleanup () |
Empty the hash table for native functions. More... | |
Create_func * | find_native_function_builder (const LEX_STRING &name) |
Find the native function builder associated with a given function name. More... | |
Create_qfunc * | find_qualified_function_builder (THD *thd) |
Find the function builder for qualified functions. More... | |
Item * | create_func_cast (THD *thd, const POS &pos, Item *a, Cast_target cast_target, const CHARSET_INFO *cs) |
static bool | validate_cast_type_and_extract_length (const THD *thd, Item *arg, const Cast_type &cast_type, bool as_array, int64_t *length, uint *precision) |
Validates a cast target type and extracts the specified length and precision of the target type. More... | |
Item * | create_func_cast (THD *thd, const POS &pos, Item *arg, const Cast_type &type, bool as_array) |
This function does not store the reference to type . More... | |
Item * | create_func_json_value (THD *thd, const POS &pos, Item *arg, Item *path, const Cast_type &type, Json_on_response_type on_empty_type, Item *on_empty_default, Json_on_response_type on_error_type, Item *on_error_default) |
Creates an Item that represents a JSON_VALUE expression. More... | |
Item * | create_temporal_literal (THD *thd, const char *str, size_t length, const CHARSET_INFO *cs, enum_field_types type, bool send_error) |
Builder for datetime literals: TIME'00:00:00', DATE'2001-01-01', TIMESTAMP'2001-01-01 00:00:00'. More... | |
Variables | |
constexpr auto | anonymous_namespace{item_create.cc}::MAX_ARGLIST_SIZE |
We use this to declare that a function takes an infinite number of arguments. More... | |
static const std::pair< const char *, Create_func * > | func_array [] |
MySQL native functions. More... | |
static const Native_functions_hash * | native_functions_hash |
Functions to create an item.
Used by sql_yacc.yy