MySQL 8.0.31
Source Code Documentation
dd::Index_impl Class Reference

#include <index_impl.h>

Inheritance diagram for dd::Index_impl:
[legend]

Public Member Functions

 Index_impl ()
 
 Index_impl (Table_impl *table)
 
 Index_impl (const Index_impl &src, Table_impl *parent)
 
 ~Index_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 serialize (Sdi_wcontext *wctx, Sdi_writer *w) const override
 Converts *this into json. More...
 
bool deserialize (Sdi_rcontext *rctx, const RJ_Value &val) override
 Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provided. More...
 
void debug_print (String_type &outb) const override
 
void set_ordinal_position (uint ordinal_position) override
 
uint ordinal_position () const override
 
const Tabletable () const override
 
Tabletable () override
 
const Table_impltable_impl () const
 
Table_impltable_impl ()
 
bool is_generated () const override
 
void set_generated (bool generated) override
 
bool is_hidden () const override
 
void set_hidden (bool hidden) override
 
const String_typecomment () const override
 
void set_comment (const String_type &comment) override
 
const Propertiesoptions () const override
 
Propertiesoptions () override
 
bool set_options (const Properties &options) override
 
bool set_options (const String_type &options_raw) override
 
const Propertiesse_private_data () const override
 
Propertiesse_private_data () override
 
bool set_se_private_data (const String_type &se_private_data_raw) override
 
bool set_se_private_data (const Properties &se_private_data) override
 
Object_id tablespace_id () const override
 
void set_tablespace_id (Object_id tablespace_id) override
 
const String_typeengine () const override
 
void set_engine (const String_type &engine) override
 
Index::enum_index_type type () const override
 
void set_type (Index::enum_index_type type) override
 
Index::enum_index_algorithm algorithm () const override
 
void set_algorithm (Index::enum_index_algorithm algorithm) override
 
bool is_algorithm_explicit () const override
 
void set_algorithm_explicit (bool alg_expl) override
 
bool is_visible () const override
 
void set_visible (bool is_visible) override
 
LEX_CSTRING engine_attribute () const override
 
void set_engine_attribute (LEX_CSTRING a) override
 
LEX_CSTRING secondary_engine_attribute () const override
 
void set_secondary_engine_attribute (LEX_CSTRING a) override
 
Index_elementadd_element (Column *c) override
 
const Index_elementselements () const override
 
bool is_candidate_key () const override
 Check if index represents candidate key. More...
 
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::Index
 ~Index () override=default
 
const Indexindex () const
 Dummy method to be able to use Partition_index and Index interchangeably in templates. More...
 
Indexindex ()
 

Static Public Member Functions

static void register_tables (Open_dictionary_tables_ctx *otx)
 
static Index_implrestore_item (Table_impl *table)
 
static Index_implclone (const Index_impl &other, Table_impl *table)
 

Private Attributes

bool m_hidden
 
bool m_is_generated
 
uint m_ordinal_position
 
String_type m_comment
 
Properties_impl m_options
 
Properties_impl m_se_private_data
 
Index::enum_index_type m_type
 
Index::enum_index_algorithm m_algorithm
 
bool m_is_algorithm_explicit
 
bool m_is_visible
 
String_type m_engine
 
String_type m_engine_attribute
 
String_type m_secondary_engine_attribute
 
Table_implm_table
 
Index_elements m_elements
 
Object_id m_tablespace_id
 

Additional Inherited Members

- Public Types inherited from dd::Index
enum  enum_index_type {
  IT_PRIMARY = 1 , IT_UNIQUE , IT_MULTIPLE , IT_FULLTEXT ,
  IT_SPATIAL
}
 
enum  enum_index_algorithm {
  IA_SE_SPECIFIC = 1 , IA_BTREE , IA_RTREE , IA_HASH ,
  IA_FULLTEXT
}
 
typedef Collection< Index_element * > Index_elements
 
typedef Index_impl Impl
 
typedef tables::Indexes DD_table
 
- 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

◆ Index_impl() [1/3]

dd::Index_impl::Index_impl ( )

◆ Index_impl() [2/3]

dd::Index_impl::Index_impl ( Table_impl table)

◆ Index_impl() [3/3]

dd::Index_impl::Index_impl ( const Index_impl src,
Table_impl parent 
)

◆ ~Index_impl()

dd::Index_impl::~Index_impl ( )
overridedefault

Member Function Documentation

◆ add_element()

Index_element * dd::Index_impl::add_element ( Column c)
overridevirtual

Implements dd::Index.

◆ algorithm()

Index::enum_index_algorithm dd::Index_impl::algorithm ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ clone()

static Index_impl * dd::Index_impl::clone ( const Index_impl other,
Table_impl table 
)
inlinestatic

◆ comment()

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

Implements dd::Index.

◆ debug_print()

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

Implements dd::Weak_object.

◆ deserialize()

bool dd::Index_impl::deserialize ( Sdi_rcontext rctx,
const RJ_Value val 
)
overridevirtual

Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provided.

Cross-references encountered within this object are tracked in sdictx, so that they can be updated when the entire object graph has been established.

Parameters
rctxstores book-keeping information for the deserialization process
valsubobject of rapidjson DOM containing json representation of this object

Implements dd::Index.

◆ drop_children()

bool dd::Index_impl::drop_children ( Open_dictionary_tables_ctx otx) const
overridevirtual

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ elements()

const Index_elements & dd::Index_impl::elements ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ engine()

const String_type & dd::Index_impl::engine ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ engine_attribute()

LEX_CSTRING dd::Index_impl::engine_attribute ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ id()

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

The unique dictionary object id.

Reimplemented from dd::Entity_object_impl.

◆ impl() [1/2]

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

Reimplemented from dd::Entity_object_impl.

◆ impl() [2/2]

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

Reimplemented from dd::Entity_object_impl.

◆ is_algorithm_explicit()

bool dd::Index_impl::is_algorithm_explicit ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ is_candidate_key()

bool dd::Index_impl::is_candidate_key ( ) const
overridevirtual

Check if index represents candidate key.

Note
This function is in sync with how we evaluate TABLE_SHARE::primary_key.

Implements dd::Index.

◆ is_generated()

bool dd::Index_impl::is_generated ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ is_hidden()

bool dd::Index_impl::is_hidden ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ is_persistent()

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

Is dictionary object persistent in dictionary tables ?

Reimplemented from dd::Entity_object_impl.

◆ is_visible()

bool dd::Index_impl::is_visible ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ name()

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

Reimplemented from dd::Entity_object_impl.

◆ object_table()

const Object_table & dd::Index_impl::object_table ( ) const
overridevirtual

◆ options() [1/2]

const Properties & dd::Index_impl::options ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ options() [2/2]

Properties & dd::Index_impl::options ( )
inlineoverridevirtual

Implements dd::Index.

◆ ordinal_position()

uint dd::Index_impl::ordinal_position ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ register_tables()

void dd::Index_impl::register_tables ( Open_dictionary_tables_ctx otx)
static

◆ restore_attributes()

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

◆ restore_children()

bool dd::Index_impl::restore_children ( Open_dictionary_tables_ctx otx)
overridevirtual

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ restore_item()

static Index_impl * dd::Index_impl::restore_item ( Table_impl table)
inlinestatic

◆ se_private_data() [1/2]

const Properties & dd::Index_impl::se_private_data ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ se_private_data() [2/2]

Properties & dd::Index_impl::se_private_data ( )
inlineoverridevirtual

Implements dd::Index.

◆ secondary_engine_attribute()

LEX_CSTRING dd::Index_impl::secondary_engine_attribute ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ serialize()

void dd::Index_impl::serialize ( Sdi_wcontext wctx,
Sdi_writer w 
) const
overridevirtual

Converts *this into json.

Converts all member variables that are to be included in the sdi into json by transforming them appropriately and passing them to the rapidjson writer provided.

Parameters
wctxopaque context for data needed by serialization
wrapidjson writer which will perform conversion to json

Implements dd::Index.

◆ set_algorithm()

void dd::Index_impl::set_algorithm ( Index::enum_index_algorithm  algorithm)
inlineoverridevirtual

Implements dd::Index.

◆ set_algorithm_explicit()

void dd::Index_impl::set_algorithm_explicit ( bool  alg_expl)
inlineoverridevirtual

Implements dd::Index.

◆ set_comment()

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

Implements dd::Index.

◆ set_engine()

void dd::Index_impl::set_engine ( const String_type engine)
inlineoverridevirtual

Implements dd::Index.

◆ set_engine_attribute()

void dd::Index_impl::set_engine_attribute ( LEX_CSTRING  a)
inlineoverridevirtual

Implements dd::Index.

◆ set_generated()

void dd::Index_impl::set_generated ( bool  generated)
inlineoverridevirtual

Implements dd::Index.

◆ set_hidden()

void dd::Index_impl::set_hidden ( bool  hidden)
inlineoverridevirtual

Implements dd::Index.

◆ set_name()

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

Reimplemented from dd::Entity_object_impl.

◆ set_options() [1/2]

bool dd::Index_impl::set_options ( const Properties options)
inlineoverridevirtual

Implements dd::Index.

◆ set_options() [2/2]

bool dd::Index_impl::set_options ( const String_type options_raw)
inlineoverridevirtual

Implements dd::Index.

◆ set_ordinal_position()

void dd::Index_impl::set_ordinal_position ( uint  ordinal_position)
inlineoverridevirtual

Implements dd::Index.

◆ set_se_private_data() [1/2]

bool dd::Index_impl::set_se_private_data ( const Properties se_private_data)
inlineoverridevirtual

Implements dd::Index.

◆ set_se_private_data() [2/2]

bool dd::Index_impl::set_se_private_data ( const String_type se_private_data_raw)
inlineoverridevirtual

Implements dd::Index.

◆ set_secondary_engine_attribute()

void dd::Index_impl::set_secondary_engine_attribute ( LEX_CSTRING  a)
inlineoverridevirtual

Implements dd::Index.

◆ set_tablespace_id()

void dd::Index_impl::set_tablespace_id ( Object_id  tablespace_id)
inlineoverridevirtual

Implements dd::Index.

◆ set_type()

void dd::Index_impl::set_type ( Index::enum_index_type  type)
inlineoverridevirtual

Implements dd::Index.

◆ set_visible()

void dd::Index_impl::set_visible ( bool  is_visible)
inlineoverridevirtual

Implements dd::Index.

◆ store_attributes()

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

◆ store_children()

bool dd::Index_impl::store_children ( Open_dictionary_tables_ctx otx)
overridevirtual

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ table() [1/2]

const Table & dd::Index_impl::table ( ) const
overridevirtual

Implements dd::Index.

◆ table() [2/2]

Table & dd::Index_impl::table ( )
overridevirtual

Implements dd::Index.

◆ table_impl() [1/2]

Table_impl & dd::Index_impl::table_impl ( )
inline

◆ table_impl() [2/2]

const Table_impl & dd::Index_impl::table_impl ( ) const
inline

◆ tablespace_id()

Object_id dd::Index_impl::tablespace_id ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ type()

Index::enum_index_type dd::Index_impl::type ( ) const
inlineoverridevirtual

Implements dd::Index.

◆ validate()

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

Member Data Documentation

◆ m_algorithm

Index::enum_index_algorithm dd::Index_impl::m_algorithm
private

◆ m_comment

String_type dd::Index_impl::m_comment
private

◆ m_elements

Index_elements dd::Index_impl::m_elements
private

◆ m_engine

String_type dd::Index_impl::m_engine
private

◆ m_engine_attribute

String_type dd::Index_impl::m_engine_attribute
private

◆ m_hidden

bool dd::Index_impl::m_hidden
private

◆ m_is_algorithm_explicit

bool dd::Index_impl::m_is_algorithm_explicit
private

◆ m_is_generated

bool dd::Index_impl::m_is_generated
private

◆ m_is_visible

bool dd::Index_impl::m_is_visible
private

◆ m_options

Properties_impl dd::Index_impl::m_options
private

◆ m_ordinal_position

uint dd::Index_impl::m_ordinal_position
private

◆ m_se_private_data

Properties_impl dd::Index_impl::m_se_private_data
private

◆ m_secondary_engine_attribute

String_type dd::Index_impl::m_secondary_engine_attribute
private

◆ m_table

Table_impl* dd::Index_impl::m_table
private

◆ m_tablespace_id

Object_id dd::Index_impl::m_tablespace_id
private

◆ m_type

Index::enum_index_type dd::Index_impl::m_type
private

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