MySQL 8.3.0
Source Code Documentation
Instantiator functions

The Instantiator functions are used to call constructors and operator new on classes that implement SQL functions, basically, even though they don't have to be functions. More...

Classes

class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, Min_argc, Max_argc >
 Instantiates a function class with the list of arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 0 >
 Instantiates a function class with no arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator_with_thd< Function_class, Min_argc, Max_argc >
 
class  anonymous_namespace{item_create.cc}::Instantiator_with_functype< Function_class, Functype, Min_argc, Max_argc >
 
class  anonymous_namespace{item_create.cc}::Instantiator_with_functype< Function_class, Function_type, 1, 1 >
 
class  anonymous_namespace{item_create.cc}::Instantiator_with_functype< Function_class, Function_type, 2, 2 >
 
class  anonymous_namespace{item_create.cc}::List_instantiator< Function_class, Min_argc, Max_argc >
 
class  anonymous_namespace{item_create.cc}::List_instantiator_with_thd< Function_class, Min_argc, Max_argc >
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 1 >
 Instantiates a function class with one argument. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 2 >
 Instantiates a function class with two arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 3 >
 Instantiates a function class with three arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 4 >
 Instantiates a function class with four arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 5 >
 Instantiates a function class with five arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 0, 1 >
 Instantiates a function class with zero or one arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 1, 2 >
 Instantiates a function class with one or two arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 1, 3 >
 Instantiates a function class with between one and three arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator_with_thd< Function_class, 1, 3 >
 Instantiates a function class taking between one and three arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator_with_thd< Function_class, 1, 2 >
 Instantiates a function class taking a thd and one or two arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 2, 3 >
 Instantiates a function class with two or three arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 2, 4 >
 Instantiates a function class with between two and four arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 2, 6 >
 Instantiates a function class with between two and six arguments. More...
 
class  anonymous_namespace{item_create.cc}::Instantiator< Function_class, 3, 5 >
 Instantiates a function class with two or three arguments. More...
 
class  anonymous_namespace{item_create.cc}::Geometry_instantiator< Geometry_class, Functype >
 
class  anonymous_namespace{item_create.cc}::Bin_instantiator
 
class  anonymous_namespace{item_create.cc}::Oct_instantiator
 
class  anonymous_namespace{item_create.cc}::Weekday_instantiator
 
class  anonymous_namespace{item_create.cc}::Weekofyear_instantiator
 
class  anonymous_namespace{item_create.cc}::Datediff_instantiator
 
class  anonymous_namespace{item_create.cc}::Subtime_instantiator
 
class  anonymous_namespace{item_create.cc}::Time_format_instantiator
 
class  anonymous_namespace{item_create.cc}::Dayofweek_instantiator
 
class  anonymous_namespace{item_create.cc}::From_unixtime_instantiator
 
class  anonymous_namespace{item_create.cc}::Round_instantiator
 
class  anonymous_namespace{item_create.cc}::Locate_instantiator
 
class  anonymous_namespace{item_create.cc}::Srid_instantiator
 
class  anonymous_namespace{item_create.cc}::Latitude_instantiator
 
class  anonymous_namespace{item_create.cc}::Longitude_instantiator
 
class  anonymous_namespace{item_create.cc}::X_instantiator
 
class  anonymous_namespace{item_create.cc}::Y_instantiator
 
class  anonymous_namespace{item_create.cc}::Yearweek_instantiator
 
class  anonymous_namespace{item_create.cc}::Make_set_instantiator
 
class  anonymous_namespace{item_create.cc}::Json_length_instantiator
 Instantiates a call to JSON_LENGTH, which may take either one or two arguments. More...
 

Typedefs

template<Item_func::Functype Functype>
using anonymous_namespace{item_create.cc}::Spatial_decomp_instantiator = Instantiator_with_functype< Item_func_spatial_decomp, Functype, 1 >
 
using anonymous_namespace{item_create.cc}::Startpoint_instantiator = Spatial_decomp_instantiator< Item_func::SP_STARTPOINT >
 
using anonymous_namespace{item_create.cc}::Endpoint_instantiator = Spatial_decomp_instantiator< Item_func::SP_ENDPOINT >
 
using anonymous_namespace{item_create.cc}::Exteriorring_instantiator = Spatial_decomp_instantiator< Item_func::SP_EXTERIORRING >
 
template<Item_func::Functype Functype>
using anonymous_namespace{item_create.cc}::Spatial_decomp_n_instantiator = Instantiator_with_functype< Item_func_spatial_decomp_n, Functype, 2 >
 
using anonymous_namespace{item_create.cc}::Sp_geometryn_instantiator = Spatial_decomp_n_instantiator< Item_func::SP_GEOMETRYN >
 
using anonymous_namespace{item_create.cc}::Sp_interiorringn_instantiator = Spatial_decomp_n_instantiator< Item_func::SP_INTERIORRINGN >
 
using anonymous_namespace{item_create.cc}::Sp_pointn_instantiator = Spatial_decomp_n_instantiator< Item_func::SP_POINTN >
 
using anonymous_namespace{item_create.cc}::txt_ft = Item_func_geometry_from_text::Functype
 
using anonymous_namespace{item_create.cc}::I_txt = Item_func_geometry_from_text
 
template<typename Geometry_class , enum Geometry_class::Functype Functype>
using anonymous_namespace{item_create.cc}::G_i = Geometry_instantiator< Geometry_class, Functype >
 
using anonymous_namespace{item_create.cc}::Geomcollfromtext_instantiator = G_i< I_txt, txt_ft::GEOMCOLLFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Geomcollfromtxt_instantiator = G_i< I_txt, txt_ft::GEOMCOLLFROMTXT >
 
using anonymous_namespace{item_create.cc}::Geometrycollectionfromtext_instantiator = G_i< I_txt, txt_ft::GEOMETRYCOLLECTIONFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Geometryfromtext_instantiator = G_i< I_txt, txt_ft::GEOMETRYFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Geomfromtext_instantiator = G_i< I_txt, txt_ft::GEOMFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Linefromtext_instantiator = G_i< I_txt, txt_ft::LINEFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Linestringfromtext_instantiator = G_i< I_txt, txt_ft::LINESTRINGFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Mlinefromtext_instantiator = G_i< I_txt, txt_ft::MLINEFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Mpointfromtext_instantiator = G_i< I_txt, txt_ft::MPOINTFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Mpolyfromtext_instantiator = G_i< I_txt, txt_ft::MPOLYFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Multilinestringfromtext_instantiator = G_i< I_txt, txt_ft::MULTILINESTRINGFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Multipointfromtext_instantiator = G_i< I_txt, txt_ft::MULTIPOINTFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Multipolygonfromtext_instantiator = G_i< I_txt, txt_ft::MULTIPOLYGONFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Pointfromtext_instantiator = G_i< I_txt, txt_ft::POINTFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Polyfromtext_instantiator = G_i< I_txt, txt_ft::POLYFROMTEXT >
 
using anonymous_namespace{item_create.cc}::Polygonfromtext_instantiator = G_i< I_txt, txt_ft::POLYGONFROMTEXT >
 
using anonymous_namespace{item_create.cc}::wkb_ft = Item_func_geometry_from_wkb::Functype
 
using anonymous_namespace{item_create.cc}::I_wkb = Item_func_geometry_from_wkb
 
using anonymous_namespace{item_create.cc}::Geomcollfromwkb_instantiator = G_i< I_wkb, wkb_ft::GEOMCOLLFROMWKB >
 
using anonymous_namespace{item_create.cc}::Geometrycollectionfromwkb_instantiator = G_i< I_wkb, wkb_ft::GEOMETRYCOLLECTIONFROMWKB >
 
using anonymous_namespace{item_create.cc}::Geometryfromwkb_instantiator = G_i< I_wkb, wkb_ft::GEOMETRYFROMWKB >
 
using anonymous_namespace{item_create.cc}::Geomfromwkb_instantiator = G_i< I_wkb, wkb_ft::GEOMFROMWKB >
 
using anonymous_namespace{item_create.cc}::Linefromwkb_instantiator = G_i< I_wkb, wkb_ft::LINEFROMWKB >
 
using anonymous_namespace{item_create.cc}::Linestringfromwkb_instantiator = G_i< I_wkb, wkb_ft::LINESTRINGFROMWKB >
 
using anonymous_namespace{item_create.cc}::Mlinefromwkb_instantiator = G_i< I_wkb, wkb_ft::MLINEFROMWKB >
 
using anonymous_namespace{item_create.cc}::Mpointfromwkb_instantiator = G_i< I_wkb, wkb_ft::MPOINTFROMWKB >
 
using anonymous_namespace{item_create.cc}::Mpolyfromwkb_instantiator = G_i< I_wkb, wkb_ft::MPOLYFROMWKB >
 
using anonymous_namespace{item_create.cc}::Multilinestringfromwkb_instantiator = G_i< I_wkb, wkb_ft::MULTILINESTRINGFROMWKB >
 
using anonymous_namespace{item_create.cc}::Multipointfromwkb_instantiator = G_i< I_wkb, wkb_ft::MULTIPOINTFROMWKB >
 
using anonymous_namespace{item_create.cc}::Multipolygonfromwkb_instantiator = G_i< I_wkb, wkb_ft::MULTIPOLYGONFROMWKB >
 
using anonymous_namespace{item_create.cc}::Pointfromwkb_instantiator = G_i< I_wkb, wkb_ft::POINTFROMWKB >
 
using anonymous_namespace{item_create.cc}::Polyfromwkb_instantiator = G_i< I_wkb, wkb_ft::POLYFROMWKB >
 
using anonymous_namespace{item_create.cc}::Polygonfromwkb_instantiator = G_i< I_wkb, wkb_ft::POLYGONFROMWKB >
 

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...
 

Detailed Description

The Instantiator functions are used to call constructors and operator new on classes that implement SQL functions, basically, even though they don't have to be functions.

This pattern has to be used because of the following reasons:

Because partial template specialization is used, the functions are implemented as class templates rather that functions templates.

Functions objects that can be created simply by calling the constructor of their respective Item_func class need only instantiate the first template below. Some functions do some special tricks before creating the function object, and in that case they need their own Instantiator. See for instance Bin_instantiator or Oct_instantiator here below for how to do that.

Keeping the templates in anonymous namespaces enables the compiler to inline more and hence keeps the generated code leaner.

Typedef Documentation

◆ Endpoint_instantiator

using anonymous_namespace{item_create.cc}::Endpoint_instantiator = typedef Spatial_decomp_instantiator<Item_func::SP_ENDPOINT>

◆ Exteriorring_instantiator

using anonymous_namespace{item_create.cc}::Exteriorring_instantiator = typedef Spatial_decomp_instantiator<Item_func::SP_EXTERIORRING>

◆ G_i

template<typename Geometry_class , enum Geometry_class::Functype Functype>
using anonymous_namespace{item_create.cc}::G_i = typedef Geometry_instantiator<Geometry_class, Functype>

◆ Geomcollfromtext_instantiator

using anonymous_namespace{item_create.cc}::Geomcollfromtext_instantiator = typedef G_i<I_txt, txt_ft::GEOMCOLLFROMTEXT>

◆ Geomcollfromtxt_instantiator

using anonymous_namespace{item_create.cc}::Geomcollfromtxt_instantiator = typedef G_i<I_txt, txt_ft::GEOMCOLLFROMTXT>

◆ Geomcollfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Geomcollfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::GEOMCOLLFROMWKB>

◆ Geometrycollectionfromtext_instantiator

using anonymous_namespace{item_create.cc}::Geometrycollectionfromtext_instantiator = typedef G_i<I_txt, txt_ft::GEOMETRYCOLLECTIONFROMTEXT>

◆ Geometrycollectionfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Geometrycollectionfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::GEOMETRYCOLLECTIONFROMWKB>

◆ Geometryfromtext_instantiator

using anonymous_namespace{item_create.cc}::Geometryfromtext_instantiator = typedef G_i<I_txt, txt_ft::GEOMETRYFROMTEXT>

◆ Geometryfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Geometryfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::GEOMETRYFROMWKB>

◆ Geomfromtext_instantiator

using anonymous_namespace{item_create.cc}::Geomfromtext_instantiator = typedef G_i<I_txt, txt_ft::GEOMFROMTEXT>

◆ Geomfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Geomfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::GEOMFROMWKB>

◆ I_txt

using anonymous_namespace{item_create.cc}::I_txt = typedef Item_func_geometry_from_text

◆ I_wkb

using anonymous_namespace{item_create.cc}::I_wkb = typedef Item_func_geometry_from_wkb

◆ Linefromtext_instantiator

using anonymous_namespace{item_create.cc}::Linefromtext_instantiator = typedef G_i<I_txt, txt_ft::LINEFROMTEXT>

◆ Linefromwkb_instantiator

using anonymous_namespace{item_create.cc}::Linefromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::LINEFROMWKB>

◆ Linestringfromtext_instantiator

using anonymous_namespace{item_create.cc}::Linestringfromtext_instantiator = typedef G_i<I_txt, txt_ft::LINESTRINGFROMTEXT>

◆ Linestringfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Linestringfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::LINESTRINGFROMWKB>

◆ Mlinefromtext_instantiator

using anonymous_namespace{item_create.cc}::Mlinefromtext_instantiator = typedef G_i<I_txt, txt_ft::MLINEFROMTEXT>

◆ Mlinefromwkb_instantiator

using anonymous_namespace{item_create.cc}::Mlinefromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::MLINEFROMWKB>

◆ Mpointfromtext_instantiator

using anonymous_namespace{item_create.cc}::Mpointfromtext_instantiator = typedef G_i<I_txt, txt_ft::MPOINTFROMTEXT>

◆ Mpointfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Mpointfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::MPOINTFROMWKB>

◆ Mpolyfromtext_instantiator

using anonymous_namespace{item_create.cc}::Mpolyfromtext_instantiator = typedef G_i<I_txt, txt_ft::MPOLYFROMTEXT>

◆ Mpolyfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Mpolyfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::MPOLYFROMWKB>

◆ Multilinestringfromtext_instantiator

using anonymous_namespace{item_create.cc}::Multilinestringfromtext_instantiator = typedef G_i<I_txt, txt_ft::MULTILINESTRINGFROMTEXT>

◆ Multilinestringfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Multilinestringfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::MULTILINESTRINGFROMWKB>

◆ Multipointfromtext_instantiator

using anonymous_namespace{item_create.cc}::Multipointfromtext_instantiator = typedef G_i<I_txt, txt_ft::MULTIPOINTFROMTEXT>

◆ Multipointfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Multipointfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::MULTIPOINTFROMWKB>

◆ Multipolygonfromtext_instantiator

using anonymous_namespace{item_create.cc}::Multipolygonfromtext_instantiator = typedef G_i<I_txt, txt_ft::MULTIPOLYGONFROMTEXT>

◆ Multipolygonfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Multipolygonfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::MULTIPOLYGONFROMWKB>

◆ Pointfromtext_instantiator

using anonymous_namespace{item_create.cc}::Pointfromtext_instantiator = typedef G_i<I_txt, txt_ft::POINTFROMTEXT>

◆ Pointfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Pointfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::POINTFROMWKB>

◆ Polyfromtext_instantiator

using anonymous_namespace{item_create.cc}::Polyfromtext_instantiator = typedef G_i<I_txt, txt_ft::POLYFROMTEXT>

◆ Polyfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Polyfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::POLYFROMWKB>

◆ Polygonfromtext_instantiator

using anonymous_namespace{item_create.cc}::Polygonfromtext_instantiator = typedef G_i<I_txt, txt_ft::POLYGONFROMTEXT>

◆ Polygonfromwkb_instantiator

using anonymous_namespace{item_create.cc}::Polygonfromwkb_instantiator = typedef G_i<I_wkb, wkb_ft::POLYGONFROMWKB>

◆ Sp_geometryn_instantiator

using anonymous_namespace{item_create.cc}::Sp_geometryn_instantiator = typedef Spatial_decomp_n_instantiator<Item_func::SP_GEOMETRYN>

◆ Sp_interiorringn_instantiator

using anonymous_namespace{item_create.cc}::Sp_interiorringn_instantiator = typedef Spatial_decomp_n_instantiator<Item_func::SP_INTERIORRINGN>

◆ Sp_pointn_instantiator

using anonymous_namespace{item_create.cc}::Sp_pointn_instantiator = typedef Spatial_decomp_n_instantiator<Item_func::SP_POINTN>

◆ Spatial_decomp_instantiator

template<Item_func::Functype Functype>
using anonymous_namespace{item_create.cc}::Spatial_decomp_instantiator = typedef Instantiator_with_functype<Item_func_spatial_decomp, Functype, 1>

◆ Spatial_decomp_n_instantiator

template<Item_func::Functype Functype>
using anonymous_namespace{item_create.cc}::Spatial_decomp_n_instantiator = typedef Instantiator_with_functype<Item_func_spatial_decomp_n, Functype, 2>

◆ Startpoint_instantiator

using anonymous_namespace{item_create.cc}::Startpoint_instantiator = typedef Spatial_decomp_instantiator<Item_func::SP_STARTPOINT>

◆ txt_ft

using anonymous_namespace{item_create.cc}::txt_ft = typedef Item_func_geometry_from_text::Functype

◆ wkb_ft

using anonymous_namespace{item_create.cc}::wkb_ft = typedef Item_func_geometry_from_wkb::Functype

Variable Documentation

◆ MAX_ARGLIST_SIZE

constexpr auto anonymous_namespace{item_create.cc}::MAX_ARGLIST_SIZE
constexpr
Initial value:
=
std::numeric_limits<decltype(PT_item_list(POS()).elements())>::max()
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independe...
Definition: parse_tree_helpers.h:104
uint elements() const
Definition: parse_tree_helpers.h:123
MY_SQL_PARSER_LTYPE POS
Definition: parse_location.h:56

We use this to declare that a function takes an infinite number of arguments.

The cryptic construction below gives us the greatest number that the return type of PT_item_list::elements() can take.

See also
Function_factory::create_func()