MySQL  8.0.19
Source Code Documentation

Functions

Sdi_type dd::serialize (const Schema &schema)
 Serialize a Schema object. More...
 
bool dd::deserialize (THD *thd, const Sdi_type &sdi, Schema *schema)
 Deserialize a dd::Schema object. More...
 
Sdi_type dd::serialize (THD *thd, const Table &table, const String_type &schema_name)
 Serialize a Table object. More...
 
Sdi_type dd::serialize (const Tablespace &tablespace)
 Serialize a Tablespace object. More...
 
bool dd::deserialize (THD *thd, const Sdi_type &sdi, Table *table, String_type *deser_schema_name=nullptr)
 Deserialize a dd::Table object. More...
 
bool dd::deserialize (THD *thd, const Sdi_type &sdi, Tablespace *tablespace)
 Deserialize a dd::Tablespace object. More...
 

Detailed Description

Functions for serializing (with complete header) and deserializing the dd object which supports this.

Function Documentation

◆ deserialize() [1/3]

bool dd::deserialize ( THD thd,
const Sdi_type sdi,
Schema schema 
)

Deserialize a dd::Schema object.

Populates the dd::Schema object provided with data from sdi string. Note! Additional objects are dynamically allocated and added to the top-level Schema object, which assumes ownership.

Parameters
thdthread context
sdiserialized representation of schema (as a json string)
schemaempty top-level object
Returns
error status
Return values
falseif successful
trueotherwise

◆ deserialize() [2/3]

bool dd::deserialize ( THD thd,
const Sdi_type sdi,
Table table,
String_type deser_schema_name = nullptr 
)

Deserialize a dd::Table object.

Populates the dd::Table object provided with data from sdi string. Note! Additional objects are dynamically allocated and added to the top-level Schema object, which assumes ownership.

Parameters
thdthread context
sdiserialized representation of schema (as a json string)
tableempty top-level object
deser_schema_namename of schema containing the table
Returns
error status
Return values
falseif successful
trueotherwise

◆ deserialize() [3/3]

bool dd::deserialize ( THD thd,
const Sdi_type sdi,
Tablespace tablespace 
)

Deserialize a dd::Tablespace object.

Populates the dd::Tablespace object provided with data from sdi string. Note! Additional objects are dynamically allocated and added to the top-level Tablespace object, which assumes ownership.

Parameters
thdthread context
sdiserialized representation of schema (as a json string)
tablespaceempty top-level object
Returns
error status
Return values
falseif successful
trueotherwise

◆ serialize() [1/3]

Sdi_type dd::serialize ( const Schema schema)

Serialize a Schema object.

Parameters
schemadobject which will be serialized
Returns
sdi (as json string).

◆ serialize() [2/3]

Sdi_type dd::serialize ( const Tablespace tablespace)

Serialize a Tablespace object.

Parameters
tablespaceobject which will be serialized
Returns
sdi (as json string).

◆ serialize() [3/3]

Sdi_type dd::serialize ( THD thd,
const Table table,
const String_type schema_name 
)

Serialize a Table object.

Parameters
thd
tableobject which will be serialized
schema_name
Returns
sdi (as json string).