MySQL  8.0.18
Source Code Documentation
dd::Function_impl Class Reference

#include <function_impl.h>

Inheritance diagram for dd::Function_impl:
dd::Routine_impl dd::Function dd::Entity_object_impl dd::Routine dd::Routine dd::Entity_object dd::Weak_object_impl dd::Entity_object dd::Entity_object dd::Weak_object dd::Weak_object dd::Weak_object dd::Weak_object

Public Member Functions

 Function_impl ()
 
virtual ~Function_impl ()
 
virtual bool update_routine_name_key (Name_key *key, Object_id schema_id, const String_type &name) const
 
virtual bool validate () const
 
virtual bool restore_attributes (const Raw_record &r)
 
virtual bool store_attributes (Raw_record *r)
 
virtual void debug_print (String_type &outb) const
 
virtual enum_column_types result_data_type () const
 
virtual void set_result_data_type (enum_column_types result_data_type)
 
virtual bool is_result_data_type_null () const
 
virtual void set_result_data_type_null (bool is_null)
 
virtual const String_typeresult_data_type_utf8 () const
 
virtual void set_result_data_type_utf8 (const String_type &result_data_type_utf8)
 
virtual bool result_is_zerofill () const
 
virtual void set_result_zerofill (bool zerofill)
 
virtual bool result_is_unsigned () const
 
virtual void set_result_unsigned (bool unsigned_flag)
 
virtual size_t result_char_length () const
 
virtual void set_result_char_length (size_t char_length)
 
virtual uint result_numeric_precision () const
 
virtual void set_result_numeric_precision (uint result_numeric_precision)
 
virtual void set_result_numeric_precision_null (bool is_null)
 
virtual bool is_result_numeric_precision_null () const
 
virtual uint result_numeric_scale () const
 
virtual void set_result_numeric_scale (uint result_numeric_scale)
 
virtual void set_result_numeric_scale_null (bool is_null)
 
virtual bool is_result_numeric_scale_null () const
 
virtual uint result_datetime_precision () const
 
virtual void set_result_datetime_precision (uint result_datetime_precision)
 
virtual void set_result_datetime_precision_null (bool is_null)
 
virtual bool is_result_datetime_precision_null () const
 
virtual Object_id result_collation_id () const
 
virtual void set_result_collation_id (Object_id result_collation_id)
 
virtual Entity_object_implimpl ()
 
virtual const Entity_object_implimpl () const
 
virtual Object_id id () const
 The unique dictionary object id. More...
 
virtual bool is_persistent () const
 Is dictionary object persistent in dictionary tables ? More...
 
virtual const String_typename () const
 
virtual void set_name (const String_type &name)
 
virtual const Object_tableobject_table () const
 
virtual Object_id schema_id () const
 
virtual void set_schema_id (Object_id schema_id)
 
virtual enum_routine_type type () const
 
virtual const String_typedefinition () const
 
virtual void set_definition (const String_type &definition)
 
virtual const String_typedefinition_utf8 () const
 
virtual void set_definition_utf8 (const String_type &definition_utf8)
 
virtual const String_typeparameter_str () const
 
virtual void set_parameter_str (const String_type &parameter_str)
 
virtual bool is_deterministic () const
 
virtual void set_deterministic (bool deterministic)
 
virtual enum_sql_data_access sql_data_access () const
 
virtual void set_sql_data_access (enum_sql_data_access sda)
 
virtual View::enum_security_type security_type () const
 
virtual void set_security_type (View::enum_security_type security_type)
 
virtual ulonglong sql_mode () const
 
virtual void set_sql_mode (ulonglong sm)
 
virtual const String_typedefiner_user () const
 
virtual const String_typedefiner_host () const
 
virtual void set_definer (const String_type &username, const String_type &hostname)
 
virtual Object_id client_collation_id () const
 
virtual void set_client_collation_id (Object_id client_collation_id)
 
virtual Object_id connection_collation_id () const
 
virtual void set_connection_collation_id (Object_id connection_collation_id)
 
virtual Object_id schema_collation_id () const
 
virtual void set_schema_collation_id (Object_id schema_collation_id)
 
virtual ulonglong created (bool convert_time) const
 
virtual void set_created (ulonglong created)
 
virtual ulonglong last_altered (bool convert_time) const
 
virtual void set_last_altered (ulonglong last_altered)
 
virtual const String_typecomment () const
 
virtual void set_comment (const String_type &comment)
 
virtual Parameteradd_parameter ()
 
virtual const Parameter_collectionparameters () const
 
virtual bool update_name_key (Name_key *key) const
 
- Public Member Functions inherited from dd::Routine_impl
 Routine_impl ()
 
virtual ~Routine_impl ()
 
virtual bool restore_children (Open_dictionary_tables_ctx *otx)
 
virtual bool store_children (Open_dictionary_tables_ctx *otx)
 
virtual bool drop_children (Open_dictionary_tables_ctx *otx) const
 
virtual void set_type (enum_routine_type routine_type)
 
- Public Member Functions inherited from dd::Entity_object_impl
 Entity_object_impl ()
 
void set_id (Object_id id)
 
virtual Object_keycreate_primary_key () const override
 
virtual 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 ()
 
 Weak_object (const Weak_object &)=default
 
virtual ~Weak_object ()
 
- Public Member Functions inherited from dd::Weak_object_impl
 Weak_object_impl ()
 
virtual ~Weak_object_impl ()
 
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
 
virtual ~Routine ()
 
- Public Member Functions inherited from dd::Function
virtual ~Function ()
 

Private Member Functions

 Function_impl (const Function_impl &src)
 
Function_implclone () const
 Allocate a new object graph and invoke the copy contructor for each object. 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
virtual void set_primary_key_value (const Raw_new_record &r) override
 
virtual 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
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()

virtual dd::Function_impl::~Function_impl ( )
inlinevirtual

◆ Function_impl() [2/2]

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

Member Function Documentation

◆ add_parameter()

virtual Parameter* dd::Function_impl::add_parameter ( )
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ client_collation_id()

virtual Object_id dd::Function_impl::client_collation_id ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ clone()

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

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

Only used in unit testing.

Returns
pointer to dynamically allocated copy

Implements dd::Function.

◆ comment()

virtual const String_type& dd::Function_impl::comment ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ connection_collation_id()

virtual Object_id dd::Function_impl::connection_collation_id ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ created()

virtual ulonglong dd::Function_impl::created ( bool  convert_time) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ debug_print()

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

Reimplemented from dd::Routine_impl.

◆ definer_host()

virtual const String_type& dd::Function_impl::definer_host ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ definer_user()

virtual const String_type& dd::Function_impl::definer_user ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ definition()

virtual const String_type& dd::Function_impl::definition ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ definition_utf8()

virtual const String_type& dd::Function_impl::definition_utf8 ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ id()

virtual Object_id dd::Function_impl::id ( ) const
inlinevirtual

The unique dictionary object id.

Reimplemented from dd::Routine_impl.

◆ impl() [1/2]

virtual Entity_object_impl* dd::Function_impl::impl ( )
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ impl() [2/2]

virtual const Entity_object_impl* dd::Function_impl::impl ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ is_deterministic()

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

Reimplemented from dd::Routine_impl.

◆ is_persistent()

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

Is dictionary object persistent in dictionary tables ?

Reimplemented from dd::Routine_impl.

◆ is_result_data_type_null()

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

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()

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

Implements dd::Function.

◆ last_altered()

virtual ulonglong dd::Function_impl::last_altered ( bool  convert_time) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ name()

virtual const String_type& dd::Function_impl::name ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ object_table()

virtual const Object_table& dd::Function_impl::object_table ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ parameter_str()

virtual const String_type& dd::Function_impl::parameter_str ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ parameters()

virtual const Parameter_collection& dd::Function_impl::parameters ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ restore_attributes()

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

Reimplemented from dd::Routine_impl.

◆ result_char_length()

virtual size_t dd::Function_impl::result_char_length ( ) const
inlinevirtual

Implements dd::Function.

◆ result_collation_id()

virtual Object_id dd::Function_impl::result_collation_id ( ) const
inlinevirtual

Implements dd::Function.

◆ result_data_type()

virtual enum_column_types dd::Function_impl::result_data_type ( ) const
inlinevirtual

Implements dd::Function.

◆ result_data_type_utf8()

virtual const String_type& dd::Function_impl::result_data_type_utf8 ( ) const
inlinevirtual

Implements dd::Function.

◆ result_datetime_precision()

virtual uint dd::Function_impl::result_datetime_precision ( ) const
inlinevirtual

Implements dd::Function.

◆ result_is_unsigned()

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

Implements dd::Function.

◆ result_is_zerofill()

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

Implements dd::Function.

◆ result_numeric_precision()

virtual uint dd::Function_impl::result_numeric_precision ( ) const
inlinevirtual

Implements dd::Function.

◆ result_numeric_scale()

virtual uint dd::Function_impl::result_numeric_scale ( ) const
inlinevirtual

Implements dd::Function.

◆ schema_collation_id()

virtual Object_id dd::Function_impl::schema_collation_id ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ schema_id()

virtual Object_id dd::Function_impl::schema_id ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ security_type()

virtual View::enum_security_type dd::Function_impl::security_type ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_client_collation_id()

virtual void dd::Function_impl::set_client_collation_id ( Object_id  client_collation_id)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_comment()

virtual void dd::Function_impl::set_comment ( const String_type comment)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_connection_collation_id()

virtual void dd::Function_impl::set_connection_collation_id ( Object_id  connection_collation_id)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_created()

virtual void dd::Function_impl::set_created ( ulonglong  created)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_definer()

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

Reimplemented from dd::Routine_impl.

◆ set_definition()

virtual void dd::Function_impl::set_definition ( const String_type definition)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_definition_utf8()

virtual void dd::Function_impl::set_definition_utf8 ( const String_type definition_utf8)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_deterministic()

virtual void dd::Function_impl::set_deterministic ( bool  deterministic)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_last_altered()

virtual void dd::Function_impl::set_last_altered ( ulonglong  last_altered)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_name()

virtual void dd::Function_impl::set_name ( const String_type name)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_parameter_str()

virtual void dd::Function_impl::set_parameter_str ( const String_type parameter_str)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_result_char_length()

virtual void dd::Function_impl::set_result_char_length ( size_t  char_length)
inlinevirtual

Implements dd::Function.

◆ set_result_collation_id()

virtual void dd::Function_impl::set_result_collation_id ( Object_id  result_collation_id)
inlinevirtual

Implements dd::Function.

◆ set_result_data_type()

virtual void dd::Function_impl::set_result_data_type ( enum_column_types  result_data_type)
inlinevirtual

Implements dd::Function.

◆ set_result_data_type_null()

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

Implements dd::Function.

◆ set_result_data_type_utf8()

virtual void dd::Function_impl::set_result_data_type_utf8 ( const String_type result_data_type_utf8)
inlinevirtual

Implements dd::Function.

◆ set_result_datetime_precision()

virtual void dd::Function_impl::set_result_datetime_precision ( uint  result_datetime_precision)
inlinevirtual

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()

virtual void dd::Function_impl::set_result_numeric_precision ( uint  result_numeric_precision)
inlinevirtual

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()

virtual void dd::Function_impl::set_result_numeric_scale ( uint  result_numeric_scale)
inlinevirtual

Implements dd::Function.

◆ set_result_numeric_scale_null()

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

Implements dd::Function.

◆ set_result_unsigned()

virtual void dd::Function_impl::set_result_unsigned ( bool  unsigned_flag)
inlinevirtual

Implements dd::Function.

◆ set_result_zerofill()

virtual void dd::Function_impl::set_result_zerofill ( bool  zerofill)
inlinevirtual

Implements dd::Function.

◆ set_schema_collation_id()

virtual void dd::Function_impl::set_schema_collation_id ( Object_id  schema_collation_id)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_schema_id()

virtual void dd::Function_impl::set_schema_id ( Object_id  schema_id)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_security_type()

virtual void dd::Function_impl::set_security_type ( View::enum_security_type  security_type)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_sql_data_access()

virtual void dd::Function_impl::set_sql_data_access ( enum_sql_data_access  sda)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ set_sql_mode()

virtual void dd::Function_impl::set_sql_mode ( ulonglong  sm)
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ sql_data_access()

virtual enum_sql_data_access dd::Function_impl::sql_data_access ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ sql_mode()

virtual ulonglong dd::Function_impl::sql_mode ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ store_attributes()

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

Reimplemented from dd::Routine_impl.

◆ type()

virtual enum_routine_type dd::Function_impl::type ( ) const
inlinevirtual

Reimplemented from dd::Routine_impl.

◆ update_name_key()

virtual bool dd::Function_impl::update_name_key ( Name_key key) const
inlinevirtual

Reimplemented from dd::Function.

◆ update_routine_name_key()

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

Implements dd::Routine.

◆ validate()

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

Reimplemented from dd::Routine_impl.

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: