MySQL 8.4.2
Source Code Documentation
dd::Function_impl Class Reference

#include <function_impl.h>

Inheritance diagram for dd::Function_impl:
[legend]

Public Member Functions

 Function_impl ()
 
 ~Function_impl () override=default
 
bool update_routine_name_key (Name_key *key, Object_id schema_id, const String_type &name) const override
 
bool validate () const override
 
bool restore_attributes (const Raw_record &r) override
 
bool store_attributes (Raw_record *r) override
 
void debug_print (String_type &outb) const override
 
enum_column_types result_data_type () const override
 
void set_result_data_type (enum_column_types result_data_type) override
 
bool is_result_data_type_null () const override
 
void set_result_data_type_null (bool is_null) override
 
const String_typeresult_data_type_utf8 () const override
 
void set_result_data_type_utf8 (const String_type &result_data_type_utf8) override
 
bool result_is_zerofill () const override
 
void set_result_zerofill (bool zerofill) override
 
bool result_is_unsigned () const override
 
void set_result_unsigned (bool unsigned_flag) override
 
size_t result_char_length () const override
 
void set_result_char_length (size_t char_length) override
 
uint result_numeric_precision () const override
 
void set_result_numeric_precision (uint result_numeric_precision) override
 
virtual void set_result_numeric_precision_null (bool is_null)
 
virtual bool is_result_numeric_precision_null () const
 
uint result_numeric_scale () const override
 
void set_result_numeric_scale (uint result_numeric_scale) override
 
void set_result_numeric_scale_null (bool is_null) override
 
bool is_result_numeric_scale_null () const override
 
uint result_datetime_precision () const override
 
void set_result_datetime_precision (uint result_datetime_precision) override
 
virtual void set_result_datetime_precision_null (bool is_null)
 
virtual bool is_result_datetime_precision_null () const
 
Object_id result_collation_id () const override
 
void set_result_collation_id (Object_id result_collation_id) override
 
Entity_object_implimpl () override
 
const Entity_object_implimpl () const override
 
Object_id id () const override
 The unique dictionary object id. More...
 
bool is_persistent () const override
 Is dictionary object persistent in dictionary tables ? More...
 
const String_typename () const override
 
void set_name (const String_type &name) override
 
const Object_tableobject_table () const override
 
Object_id schema_id () const override
 
void set_schema_id (Object_id schema_id) override
 
enum_routine_type type () const override
 
const String_typedefinition () const override
 
void set_definition (const String_type &definition) override
 
const String_typedefinition_utf8 () const override
 
void set_definition_utf8 (const String_type &definition_utf8) override
 
const String_typeparameter_str () const override
 
void set_parameter_str (const String_type &parameter_str) override
 
bool is_deterministic () const override
 
void set_deterministic (bool deterministic) override
 
enum_sql_data_access sql_data_access () const override
 
void set_sql_data_access (enum_sql_data_access sda) override
 
const String_typeexternal_language () const override
 
void set_external_language (const String_type &el) override
 
View::enum_security_type security_type () const override
 
void set_security_type (View::enum_security_type security_type) override
 
ulonglong sql_mode () const override
 
void set_sql_mode (ulonglong sm) override
 
const String_typedefiner_user () const override
 
const String_typedefiner_host () const override
 
void set_definer (const String_type &username, const String_type &hostname) override
 
Object_id client_collation_id () const override
 
void set_client_collation_id (Object_id client_collation_id) override
 
Object_id connection_collation_id () const override
 
void set_connection_collation_id (Object_id connection_collation_id) override
 
Object_id schema_collation_id () const override
 
void set_schema_collation_id (Object_id schema_collation_id) override
 
ulonglong created (bool convert_time) const override
 
void set_created (ulonglong created) override
 
ulonglong last_altered (bool convert_time) const override
 
void set_last_altered (ulonglong last_altered) override
 
const String_typecomment () const override
 
void set_comment (const String_type &comment) override
 
Parameteradd_parameter () override
 
const Parameter_collectionparameters () const override
 
bool update_name_key (Name_key *key) const override
 
- Public Member Functions inherited from dd::Routine_impl
 Routine_impl ()
 
 ~Routine_impl () override
 
const Object_tableobject_table () const override
 
bool validate () const override
 
bool restore_children (Open_dictionary_tables_ctx *otx) override
 
bool store_children (Open_dictionary_tables_ctx *otx) override
 
bool drop_children (Open_dictionary_tables_ctx *otx) const override
 
bool restore_attributes (const Raw_record &r) override
 
bool store_attributes (Raw_record *r) override
 
void debug_print (String_type &outb) const override
 
Object_id schema_id () const override
 
void set_schema_id (Object_id schema_id) override
 
enum_routine_type type () const override
 
virtual void set_type (enum_routine_type routine_type)
 
const String_typedefinition () const override
 
void set_definition (const String_type &definition) override
 
const String_typedefinition_utf8 () const override
 
void set_definition_utf8 (const String_type &definition_utf8) override
 
const String_typeparameter_str () const override
 
void set_parameter_str (const String_type &parameter_str) override
 
bool is_deterministic () const override
 
void set_deterministic (bool deterministic) override
 
enum_sql_data_access sql_data_access () const override
 
void set_sql_data_access (enum_sql_data_access sda) override
 
const String_typeexternal_language () const override
 
void set_external_language (const String_type &el) override
 
View::enum_security_type security_type () const override
 
void set_security_type (View::enum_security_type security_type) override
 
ulonglong sql_mode () const override
 
void set_sql_mode (ulonglong sm) override
 
const String_typedefiner_user () const override
 
const String_typedefiner_host () const override
 
void set_definer (const String_type &username, const String_type &hostname) override
 
Object_id client_collation_id () const override
 
void set_client_collation_id (Object_id client_collation_id) override
 
Object_id connection_collation_id () const override
 
void set_connection_collation_id (Object_id connection_collation_id) override
 
Object_id schema_collation_id () const override
 
void set_schema_collation_id (Object_id schema_collation_id) override
 
ulonglong created (bool convert_time) const override
 
void set_created (ulonglong created) override
 
ulonglong last_altered (bool convert_time) const override
 
void set_last_altered (ulonglong last_altered) override
 
const String_typecomment () const override
 
void set_comment (const String_type &comment) override
 
Parameteradd_parameter () override
 
const Parameter_collectionparameters () const override
 
Entity_object_implimpl () override
 
const Entity_object_implimpl () const override
 
Object_id id () const override
 The unique dictionary object id. More...
 
bool is_persistent () const override
 Is dictionary object persistent in dictionary tables ? More...
 
const String_typename () const override
 
void set_name (const String_type &name) override
 
- Public Member Functions inherited from dd::Entity_object_impl
 Entity_object_impl ()
 
void set_id (Object_id id)
 
Object_keycreate_primary_key () const override
 
bool has_new_primary_key () const override
 Indicates that object is guaranteed to have primary key value which doesn't exist in database (e.g. More...
 
- Public Member Functions inherited from dd::Weak_object
 Weak_object ()=default
 
 Weak_object (const Weak_object &)=default
 
virtual ~Weak_object ()=default
 
- Public Member Functions inherited from dd::Weak_object_impl_< use_pfs >
 Weak_object_impl_ ()=default
 
 ~Weak_object_impl_ () override=default
 
void * operator new (size_t size, const std::nothrow_t &nt) noexcept
 
void operator delete (void *ptr, const std::nothrow_t &nt) noexcept
 
void * operator new (size_t size) noexcept
 
void operator delete (void *ptr) noexcept
 
virtual bool store (Open_dictionary_tables_ctx *otx)
 Store the DD object into DD table. More...
 
bool drop (Open_dictionary_tables_ctx *otx) const
 Drop the DD object from DD table. More...
 
- Public Member Functions inherited from dd::Routine
virtual bool update_id_key (Id_key *key) const
 
virtual bool update_aux_key (Aux_key *) const
 
 ~Routine () override=default
 
- Public Member Functions inherited from dd::Function
bool update_name_key (Name_key *key) const override
 
 ~Function () override=default
 

Private Member Functions

 Function_impl (const Function_impl &src)
 
Function_implclone () const override
 Allocate a new object graph and invoke the copy constructor for each object. More...
 
Function_implclone_dropped_object_placeholder () const override
 Allocate a new object which can serve as a placeholder for the original object in the Dictionary_client's dropped registry. More...
 

Private Attributes

enum_column_types m_result_data_type
 
String_type m_result_data_type_utf8
 
bool m_result_data_type_null
 
bool m_result_is_zerofill
 
bool m_result_is_unsigned
 
bool m_result_numeric_precision_null
 
bool m_result_numeric_scale_null
 
bool m_result_datetime_precision_null
 
uint m_result_numeric_precision
 
uint m_result_numeric_scale
 
uint m_result_datetime_precision
 
size_t m_result_char_length
 
Object_id m_result_collation_id
 

Additional Inherited Members

- Public Types inherited from dd::Routine
enum  enum_routine_type { RT_FUNCTION = 1 , RT_PROCEDURE }
 
enum  enum_sql_data_access { SDA_CONTAINS_SQL = 1 , SDA_NO_SQL , SDA_READS_SQL_DATA , SDA_MODIFIES_SQL_DATA }
 
typedef Routine_impl Impl
 
typedef Routine Cache_partition
 
typedef tables::Routines DD_table
 
typedef Primary_id_key Id_key
 
typedef Routine_name_key Name_key
 
typedef Void_key Aux_key
 
typedef Collection< Parameter * > Parameter_collection
 
- Public Types inherited from dd::Function
typedef Function_impl Impl
 
- Static Public Member Functions inherited from dd::Routine_impl
static void register_tables (Open_dictionary_tables_ctx *otx)
 
- Static Public Member Functions inherited from dd::Routine
static bool update_id_key (Id_key *key, Object_id id)
 
static void create_mdl_key (enum_routine_type type, const String_type &schema_name, const String_type &name, MDL_key *key)
 
static const CHARSET_INFOname_collation ()
 
- Static Public Member Functions inherited from dd::Function
static bool update_name_key (Name_key *key, Object_id schema_id, const String_type &name)
 
static void create_mdl_key (const String_type &schema_name, const String_type &name, MDL_key *key)
 
- Protected Member Functions inherited from dd::Routine_impl
 Routine_impl (const Routine_impl &src)
 
- Protected Member Functions inherited from dd::Entity_object_impl
void set_primary_key_value (const Raw_new_record &r) override
 
void fix_has_new_primary_key () override
 
void restore_id (const Raw_record &r, int field_idx)
 
void restore_name (const Raw_record &r, int field_idx)
 
bool store_id (Raw_record *r, int field_idx)
 
bool store_name (Raw_record *r, int field_idx)
 
bool store_name (Raw_record *r, int field_idx, bool is_null)
 
void serialize (Sdi_wcontext *wctx, Sdi_writer *w) const
 
bool deserialize (Sdi_rcontext *rctx, const RJ_Value &val)
 
 Entity_object_impl (const Entity_object_impl &src)
 
- Protected Member Functions inherited from dd::Weak_object_impl_< use_pfs >
bool check_parent_consistency (Entity_object_impl *parent, Object_id parent_id) const
 

Constructor & Destructor Documentation

◆ Function_impl() [1/2]

dd::Function_impl::Function_impl ( )

◆ ~Function_impl()

dd::Function_impl::~Function_impl ( )
overridedefault

◆ Function_impl() [2/2]

dd::Function_impl::Function_impl ( const Function_impl src)
private

Member Function Documentation

◆ add_parameter()

Parameter * dd::Function_impl::add_parameter ( )
inlineoverridevirtual

Implements dd::Routine.

◆ client_collation_id()

Object_id dd::Function_impl::client_collation_id ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ clone()

Function_impl * dd::Function_impl::clone ( ) const
inlineoverrideprivatevirtual

Allocate a new object graph and invoke the copy constructor for each object.

Only used in unit testing.

Returns
pointer to dynamically allocated copy

Implements dd::Function.

◆ clone_dropped_object_placeholder()

Function_impl * dd::Function_impl::clone_dropped_object_placeholder ( ) const
inlineoverrideprivatevirtual

Allocate a new object which can serve as a placeholder for the original object in the Dictionary_client's dropped registry.

Such object has the same keys as the original but has no other info and as result occupies less memory.

Implements dd::Function.

◆ comment()

const String_type & dd::Function_impl::comment ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ connection_collation_id()

Object_id dd::Function_impl::connection_collation_id ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ created()

ulonglong dd::Function_impl::created ( bool  convert_time) const
inlineoverridevirtual

Implements dd::Routine.

◆ debug_print()

void dd::Function_impl::debug_print ( String_type outb) const
overridevirtual

Implements dd::Weak_object.

◆ definer_host()

const String_type & dd::Function_impl::definer_host ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ definer_user()

const String_type & dd::Function_impl::definer_user ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ definition()

const String_type & dd::Function_impl::definition ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ definition_utf8()

const String_type & dd::Function_impl::definition_utf8 ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ external_language()

const String_type & dd::Function_impl::external_language ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ id()

Object_id dd::Function_impl::id ( ) const
inlineoverridevirtual

The unique dictionary object id.

Reimplemented from dd::Entity_object_impl.

◆ impl() [1/2]

const Entity_object_impl * dd::Function_impl::impl ( ) const
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ impl() [2/2]

Entity_object_impl * dd::Function_impl::impl ( )
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ is_deterministic()

bool dd::Function_impl::is_deterministic ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ is_persistent()

bool dd::Function_impl::is_persistent ( ) const
inlineoverridevirtual

Is dictionary object persistent in dictionary tables ?

Reimplemented from dd::Entity_object_impl.

◆ is_result_data_type_null()

bool dd::Function_impl::is_result_data_type_null ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ is_result_datetime_precision_null()

virtual bool dd::Function_impl::is_result_datetime_precision_null ( ) const
inlinevirtual

◆ is_result_numeric_precision_null()

virtual bool dd::Function_impl::is_result_numeric_precision_null ( ) const
inlinevirtual

◆ is_result_numeric_scale_null()

bool dd::Function_impl::is_result_numeric_scale_null ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ last_altered()

ulonglong dd::Function_impl::last_altered ( bool  convert_time) const
inlineoverridevirtual

Implements dd::Routine.

◆ name()

const String_type & dd::Function_impl::name ( ) const
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ object_table()

const Object_table & dd::Function_impl::object_table ( ) const
inlineoverridevirtual

◆ parameter_str()

const String_type & dd::Function_impl::parameter_str ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ parameters()

const Parameter_collection & dd::Function_impl::parameters ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ restore_attributes()

bool dd::Function_impl::restore_attributes ( const Raw_record r)
overridevirtual

◆ result_char_length()

size_t dd::Function_impl::result_char_length ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_collation_id()

Object_id dd::Function_impl::result_collation_id ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_data_type()

enum_column_types dd::Function_impl::result_data_type ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_data_type_utf8()

const String_type & dd::Function_impl::result_data_type_utf8 ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_datetime_precision()

uint dd::Function_impl::result_datetime_precision ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_is_unsigned()

bool dd::Function_impl::result_is_unsigned ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_is_zerofill()

bool dd::Function_impl::result_is_zerofill ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_numeric_precision()

uint dd::Function_impl::result_numeric_precision ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ result_numeric_scale()

uint dd::Function_impl::result_numeric_scale ( ) const
inlineoverridevirtual

Implements dd::Function.

◆ schema_collation_id()

Object_id dd::Function_impl::schema_collation_id ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ schema_id()

Object_id dd::Function_impl::schema_id ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ security_type()

View::enum_security_type dd::Function_impl::security_type ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ set_client_collation_id()

void dd::Function_impl::set_client_collation_id ( Object_id  client_collation_id)
inlineoverridevirtual

Implements dd::Routine.

◆ set_comment()

void dd::Function_impl::set_comment ( const String_type comment)
inlineoverridevirtual

Implements dd::Routine.

◆ set_connection_collation_id()

void dd::Function_impl::set_connection_collation_id ( Object_id  connection_collation_id)
inlineoverridevirtual

Implements dd::Routine.

◆ set_created()

void dd::Function_impl::set_created ( ulonglong  created)
inlineoverridevirtual

Implements dd::Routine.

◆ set_definer()

void dd::Function_impl::set_definer ( const String_type username,
const String_type hostname 
)
inlineoverridevirtual

Implements dd::Routine.

◆ set_definition()

void dd::Function_impl::set_definition ( const String_type definition)
inlineoverridevirtual

Implements dd::Routine.

◆ set_definition_utf8()

void dd::Function_impl::set_definition_utf8 ( const String_type definition_utf8)
inlineoverridevirtual

Implements dd::Routine.

◆ set_deterministic()

void dd::Function_impl::set_deterministic ( bool  deterministic)
inlineoverridevirtual

Implements dd::Routine.

◆ set_external_language()

void dd::Function_impl::set_external_language ( const String_type el)
inlineoverridevirtual

Implements dd::Routine.

◆ set_last_altered()

void dd::Function_impl::set_last_altered ( ulonglong  last_altered)
inlineoverridevirtual

Implements dd::Routine.

◆ set_name()

void dd::Function_impl::set_name ( const String_type name)
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ set_parameter_str()

void dd::Function_impl::set_parameter_str ( const String_type parameter_str)
inlineoverridevirtual

Implements dd::Routine.

◆ set_result_char_length()

void dd::Function_impl::set_result_char_length ( size_t  char_length)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_collation_id()

void dd::Function_impl::set_result_collation_id ( Object_id  result_collation_id)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_data_type()

void dd::Function_impl::set_result_data_type ( enum_column_types  result_data_type)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_data_type_null()

void dd::Function_impl::set_result_data_type_null ( bool  is_null)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_data_type_utf8()

void dd::Function_impl::set_result_data_type_utf8 ( const String_type result_data_type_utf8)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_datetime_precision()

void dd::Function_impl::set_result_datetime_precision ( uint  result_datetime_precision)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_datetime_precision_null()

virtual void dd::Function_impl::set_result_datetime_precision_null ( bool  is_null)
inlinevirtual

◆ set_result_numeric_precision()

void dd::Function_impl::set_result_numeric_precision ( uint  result_numeric_precision)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_numeric_precision_null()

virtual void dd::Function_impl::set_result_numeric_precision_null ( bool  is_null)
inlinevirtual

◆ set_result_numeric_scale()

void dd::Function_impl::set_result_numeric_scale ( uint  result_numeric_scale)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_numeric_scale_null()

void dd::Function_impl::set_result_numeric_scale_null ( bool  is_null)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_unsigned()

void dd::Function_impl::set_result_unsigned ( bool  unsigned_flag)
inlineoverridevirtual

Implements dd::Function.

◆ set_result_zerofill()

void dd::Function_impl::set_result_zerofill ( bool  zerofill)
inlineoverridevirtual

Implements dd::Function.

◆ set_schema_collation_id()

void dd::Function_impl::set_schema_collation_id ( Object_id  schema_collation_id)
inlineoverridevirtual

Implements dd::Routine.

◆ set_schema_id()

void dd::Function_impl::set_schema_id ( Object_id  schema_id)
inlineoverridevirtual

Implements dd::Routine.

◆ set_security_type()

void dd::Function_impl::set_security_type ( View::enum_security_type  security_type)
inlineoverridevirtual

Implements dd::Routine.

◆ set_sql_data_access()

void dd::Function_impl::set_sql_data_access ( enum_sql_data_access  sda)
inlineoverridevirtual

Implements dd::Routine.

◆ set_sql_mode()

void dd::Function_impl::set_sql_mode ( ulonglong  sm)
inlineoverridevirtual

Implements dd::Routine.

◆ sql_data_access()

enum_sql_data_access dd::Function_impl::sql_data_access ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ sql_mode()

ulonglong dd::Function_impl::sql_mode ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ store_attributes()

bool dd::Function_impl::store_attributes ( Raw_record r)
overridevirtual

◆ type()

enum_routine_type dd::Function_impl::type ( ) const
inlineoverridevirtual

Implements dd::Routine.

◆ update_name_key()

bool dd::Function_impl::update_name_key ( Name_key key) const
inlineoverridevirtual

Reimplemented from dd::Routine.

◆ update_routine_name_key()

bool dd::Function_impl::update_routine_name_key ( Name_key key,
Object_id  schema_id,
const String_type name 
) const
overridevirtual

Implements dd::Routine.

◆ validate()

bool dd::Function_impl::validate ( ) const
overridevirtual

Member Data Documentation

◆ m_result_char_length

size_t dd::Function_impl::m_result_char_length
private

◆ m_result_collation_id

Object_id dd::Function_impl::m_result_collation_id
private

◆ m_result_data_type

enum_column_types dd::Function_impl::m_result_data_type
private

◆ m_result_data_type_null

bool dd::Function_impl::m_result_data_type_null
private

◆ m_result_data_type_utf8

String_type dd::Function_impl::m_result_data_type_utf8
private

◆ m_result_datetime_precision

uint dd::Function_impl::m_result_datetime_precision
private

◆ m_result_datetime_precision_null

bool dd::Function_impl::m_result_datetime_precision_null
private

◆ m_result_is_unsigned

bool dd::Function_impl::m_result_is_unsigned
private

◆ m_result_is_zerofill

bool dd::Function_impl::m_result_is_zerofill
private

◆ m_result_numeric_precision

uint dd::Function_impl::m_result_numeric_precision
private

◆ m_result_numeric_precision_null

bool dd::Function_impl::m_result_numeric_precision_null
private

◆ m_result_numeric_scale

uint dd::Function_impl::m_result_numeric_scale
private

◆ m_result_numeric_scale_null

bool dd::Function_impl::m_result_numeric_scale_null
private

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