MySQL  8.0.21
Source Code Documentation
dd::Index_element_impl Class Reference

#include <index_element_impl.h>

Inheritance diagram for dd::Index_element_impl:
dd::Weak_object_impl dd::Index_element dd::Weak_object dd::Weak_object

Public Member Functions

 Index_element_impl ()
 
 Index_element_impl (Index_impl *index, Column *column)
 
 Index_element_impl (const Index_element_impl &src, Index_impl *parent, Column *column)
 
virtual ~Index_element_impl ()
 
virtual const Object_tableobject_table () const
 
virtual bool validate () const
 
virtual bool store_attributes (Raw_record *r)
 
virtual bool restore_attributes (const Raw_record &r)
 
void serialize (Sdi_wcontext *wctx, Sdi_writer *w) const
 Converts *this into json. More...
 
bool deserialize (Sdi_rcontext *rctx, const RJ_Value &val)
 Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provided. More...
 
void set_ordinal_position (uint ordinal_position)
 
virtual const Indexindex () const
 
virtual Indexindex ()
 
virtual const Columncolumn () const
 
virtual Columncolumn ()
 
virtual uint ordinal_position () const
 
virtual uint length () const
 
virtual void set_length (uint length)
 
virtual void set_length_null (bool)
 
virtual bool is_length_null () const
 
virtual bool is_hidden () const
 
virtual void set_hidden (bool hidden)
 
virtual enum_index_element_order order () const
 
virtual void set_order (enum_index_element_order order)
 
virtual bool is_prefix () const
 Check if index element represents prefix key part on the column. More...
 
virtual void debug_print (String_type &outb) const
 
virtual Object_keycreate_primary_key () const
 
virtual bool has_new_primary_key () const
 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_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...
 
virtual bool restore_children (Open_dictionary_tables_ctx *)
 
virtual bool store_children (Open_dictionary_tables_ctx *)
 
virtual bool drop_children (Open_dictionary_tables_ctx *) const
 
- 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::Index_element
virtual ~Index_element ()
 
virtual void set_order (enum_index_element_order order)=0
 

Static Public Member Functions

static void register_tables (Open_dictionary_tables_ctx *otx)
 
static Index_element_implrestore_item (Index_impl *index)
 
static Index_element_implclone (const Index_element_impl &other, Index_impl *index)
 

Private Attributes

uint m_ordinal_position
 
uint m_length
 
enum_index_element_order m_order
 
bool m_hidden
 
Index_implm_index
 
Columnm_column
 

Additional Inherited Members

- Public Types inherited from dd::Index_element
enum  enum_index_element_order { ORDER_UNDEF = 1, ORDER_ASC, ORDER_DESC }
 
typedef Index_element_impl Impl
 
typedef tables::Index_column_usage DD_table
 
- Protected Member Functions inherited from dd::Weak_object_impl
virtual void set_primary_key_value (const Raw_new_record &)
 
virtual void fix_has_new_primary_key ()
 
bool check_parent_consistency (Entity_object_impl *parent, Object_id parent_id) const
 

Constructor & Destructor Documentation

◆ Index_element_impl() [1/3]

dd::Index_element_impl::Index_element_impl ( )
inline

◆ Index_element_impl() [2/3]

dd::Index_element_impl::Index_element_impl ( Index_impl index,
Column column 
)
inline

◆ Index_element_impl() [3/3]

dd::Index_element_impl::Index_element_impl ( const Index_element_impl src,
Index_impl parent,
Column column 
)

◆ ~Index_element_impl()

virtual dd::Index_element_impl::~Index_element_impl ( )
inlinevirtual

Member Function Documentation

◆ clone()

Index_element_impl * dd::Index_element_impl::clone ( const Index_element_impl other,
Index_impl index 
)
static

◆ column() [1/2]

virtual const Column& dd::Index_element_impl::column ( ) const
inlinevirtual

Implements dd::Index_element.

◆ column() [2/2]

virtual Column& dd::Index_element_impl::column ( )
inlinevirtual

Implements dd::Index_element.

◆ create_primary_key()

Object_key * dd::Index_element_impl::create_primary_key ( ) const
virtual

Implements dd::Weak_object_impl.

◆ debug_print()

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

Implements dd::Weak_object.

◆ deserialize()

bool dd::Index_element_impl::deserialize ( Sdi_rcontext rctx,
const RJ_Value val 
)
virtual

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

◆ has_new_primary_key()

bool dd::Index_element_impl::has_new_primary_key ( ) const
virtual

Indicates that object is guaranteed to have primary key value which doesn't exist in database (e.g.

because it only will be generated using auto-increment at store() time). So it is ok for store() method to skip lookup of existing object with the same primary key and simply try to insert new object into the table.

Implements dd::Weak_object_impl.

◆ index() [1/2]

virtual const Index& dd::Index_element_impl::index ( ) const
inlinevirtual

Implements dd::Index_element.

◆ index() [2/2]

virtual Index& dd::Index_element_impl::index ( )
inlinevirtual

Implements dd::Index_element.

◆ is_hidden()

virtual bool dd::Index_element_impl::is_hidden ( ) const
inlinevirtual

Implements dd::Index_element.

◆ is_length_null()

virtual bool dd::Index_element_impl::is_length_null ( ) const
inlinevirtual

Implements dd::Index_element.

◆ is_prefix()

bool dd::Index_element_impl::is_prefix ( ) const
virtual

Check if index element represents prefix key part on the column.

Note
This function is in sync with how we evaluate HA_PART_KEY_SEG. As result it returns funny results for BLOB/GIS types.

Implements dd::Index_element.

◆ length()

virtual uint dd::Index_element_impl::length ( ) const
inlinevirtual

Implements dd::Index_element.

◆ object_table()

const Object_table & dd::Index_element_impl::object_table ( ) const
virtual

Implements dd::Weak_object_impl.

◆ order()

virtual enum_index_element_order dd::Index_element_impl::order ( ) const
inlinevirtual

Implements dd::Index_element.

◆ ordinal_position()

virtual uint dd::Index_element_impl::ordinal_position ( ) const
inlinevirtual

Implements dd::Index_element.

◆ register_tables()

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

◆ restore_attributes()

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

Implements dd::Weak_object_impl.

◆ restore_item()

static Index_element_impl* dd::Index_element_impl::restore_item ( Index_impl index)
inlinestatic

◆ serialize()

void dd::Index_element_impl::serialize ( Sdi_wcontext wctx,
Sdi_writer w 
) const
virtual

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

◆ set_hidden()

virtual void dd::Index_element_impl::set_hidden ( bool  hidden)
inlinevirtual

Implements dd::Index_element.

◆ set_length()

virtual void dd::Index_element_impl::set_length ( uint  length)
inlinevirtual

Implements dd::Index_element.

◆ set_length_null()

virtual void dd::Index_element_impl::set_length_null ( bool  )
inlinevirtual

Implements dd::Index_element.

◆ set_order()

virtual void dd::Index_element_impl::set_order ( enum_index_element_order  order)
inlinevirtual

◆ set_ordinal_position()

void dd::Index_element_impl::set_ordinal_position ( uint  ordinal_position)
inline

◆ store_attributes()

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

Implements dd::Weak_object_impl.

◆ validate()

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

Implements dd::Weak_object_impl.

Member Data Documentation

◆ m_column

Column* dd::Index_element_impl::m_column
private

◆ m_hidden

bool dd::Index_element_impl::m_hidden
private

◆ m_index

Index_impl* dd::Index_element_impl::m_index
private

◆ m_length

uint dd::Index_element_impl::m_length
private

◆ m_order

enum_index_element_order dd::Index_element_impl::m_order
private

◆ m_ordinal_position

uint dd::Index_element_impl::m_ordinal_position
private

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