MySQL 8.4.0
Source Code Documentation
dd::Tablespace_impl Class Reference

#include <tablespace_impl.h>

Inheritance diagram for dd::Tablespace_impl:
[legend]

Public Member Functions

 Tablespace_impl ()
 
 ~Tablespace_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 store_attributes (Raw_record *r) override
 
bool restore_attributes (const 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
 
bool is_empty (THD *thd, bool *empty) const override
 Check if the tablespace is empty, i.e., whether it has any tables. More...
 
const String_typecomment () const override
 
void set_comment (const String_type &comment) override
 
const Propertiesoptions () const override
 
Propertiesoptions () 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
 
const String_typeengine () const override
 
void set_engine (const String_type &engine) override
 
LEX_CSTRING engine_attribute () const override
 
void set_engine_attribute (LEX_CSTRING a) override
 
Tablespace_fileadd_file () override
 
bool remove_file (String_type data_file) override
 
const Tablespace_file_collectionfiles () 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::Tablespace
virtual bool update_id_key (Id_key *key) const
 
virtual bool update_name_key (Name_key *key) const
 
virtual bool update_aux_key (Aux_key *) const
 
 ~Tablespace () override=default
 

Static Public Member Functions

static void register_tables (Open_dictionary_tables_ctx *otx)
 
- Static Public Member Functions inherited from dd::Tablespace
static bool update_id_key (Id_key *key, Object_id id)
 
static bool update_name_key (Name_key *key, const String_type &name)
 

Private Member Functions

 Tablespace_impl (const Tablespace_impl &src)
 
Tablespaceclone () const override
 Allocate a new object graph and invoke the copy constructor for each object. More...
 
Tablespaceclone_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

String_type m_comment
 
Properties_impl m_options
 
Properties_impl m_se_private_data
 
String_type m_engine
 
String_type m_engine_attribute
 
Tablespace_file_collection m_files
 

Additional Inherited Members

- Public Types inherited from dd::Tablespace
typedef Tablespace_impl Impl
 
typedef Tablespace Cache_partition
 
typedef tables::Tablespaces DD_table
 
typedef Primary_id_key Id_key
 
typedef Global_name_key Name_key
 
typedef Void_key Aux_key
 
typedef Collection< Tablespace_file * > Tablespace_file_collection
 
- 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

◆ Tablespace_impl() [1/2]

dd::Tablespace_impl::Tablespace_impl ( )

◆ ~Tablespace_impl()

dd::Tablespace_impl::~Tablespace_impl ( )
overridedefault

◆ Tablespace_impl() [2/2]

dd::Tablespace_impl::Tablespace_impl ( const Tablespace_impl src)
private

Member Function Documentation

◆ add_file()

Tablespace_file * dd::Tablespace_impl::add_file ( )
overridevirtual

Implements dd::Tablespace.

◆ clone()

Tablespace * dd::Tablespace_impl::clone ( ) const
inlineoverrideprivatevirtual

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

Returns
pointer to dynamically allocated copy

Implements dd::Tablespace.

◆ clone_dropped_object_placeholder()

Tablespace * dd::Tablespace_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::Tablespace.

◆ comment()

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

Implements dd::Tablespace.

◆ debug_print()

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

Implements dd::Weak_object.

◆ deserialize()

bool dd::Tablespace_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::Tablespace.

◆ drop_children()

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

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ engine()

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

Implements dd::Tablespace.

◆ engine_attribute()

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

Implements dd::Tablespace.

◆ files()

const Tablespace_file_collection & dd::Tablespace_impl::files ( ) const
inlineoverridevirtual

Implements dd::Tablespace.

◆ id()

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

The unique dictionary object id.

Reimplemented from dd::Entity_object_impl.

◆ impl() [1/2]

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

Reimplemented from dd::Entity_object_impl.

◆ impl() [2/2]

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

Reimplemented from dd::Entity_object_impl.

◆ is_empty()

bool dd::Tablespace_impl::is_empty ( THD thd,
bool *  empty 
) const
overridevirtual

Check if the tablespace is empty, i.e., whether it has any tables.

Parameters
thdThread context.
[out]emptyWhether the tablespace is empty.
Returns
true if error, false if success.

Implements dd::Tablespace.

◆ is_persistent()

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

Is dictionary object persistent in dictionary tables ?

Reimplemented from dd::Entity_object_impl.

◆ name()

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

Reimplemented from dd::Entity_object_impl.

◆ object_table()

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

◆ options() [1/2]

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

Implements dd::Tablespace.

◆ options() [2/2]

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

Implements dd::Tablespace.

◆ register_tables()

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

◆ remove_file()

bool dd::Tablespace_impl::remove_file ( String_type  data_file)
overridevirtual

Implements dd::Tablespace.

◆ restore_attributes()

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

◆ restore_children()

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

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ se_private_data() [1/2]

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

Implements dd::Tablespace.

◆ se_private_data() [2/2]

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

Implements dd::Tablespace.

◆ serialize()

void dd::Tablespace_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::Tablespace.

◆ set_comment()

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

Implements dd::Tablespace.

◆ set_engine()

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

Implements dd::Tablespace.

◆ set_engine_attribute()

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

Implements dd::Tablespace.

◆ set_name()

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

Reimplemented from dd::Entity_object_impl.

◆ set_options()

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

Implements dd::Tablespace.

◆ set_se_private_data()

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

Implements dd::Tablespace.

◆ store_attributes()

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

◆ store_children()

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

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ validate()

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

Member Data Documentation

◆ m_comment

String_type dd::Tablespace_impl::m_comment
private

◆ m_engine

String_type dd::Tablespace_impl::m_engine
private

◆ m_engine_attribute

String_type dd::Tablespace_impl::m_engine_attribute
private

◆ m_files

Tablespace_file_collection dd::Tablespace_impl::m_files
private

◆ m_options

Properties_impl dd::Tablespace_impl::m_options
private

◆ m_se_private_data

Properties_impl dd::Tablespace_impl::m_se_private_data
private

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