MySQL  8.0.21
Source Code Documentation

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

Typedefs

using dd::SdiCompatibilityChecker = std::function< bool(const RJ_Document &)>
 Type alias for std::function wrapping a callable to check if SDI, as an RJ_Document, is compatible. More...
 

Functions

Sdi_type dd::serialize (const Schema &schema)
 Serialize a Schema 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...
 
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...
 

Detailed Description

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

Typedef Documentation

◆ SdiCompatibilityChecker

using dd::SdiCompatibilityChecker = typedef std::function<bool(const RJ_Document &)>

Type alias for std::function wrapping a callable to check if SDI, as an RJ_Document, is compatible.

Normale MySQL error handling. Return value: false => success, true => error in DA.

Function Documentation

◆ deserialize() [1/2]

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

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.

Note
Uses the default strict compatibility checking,
See also
DefaultCheckCompatibility
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() [2/2]

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

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.

Note
Uses the default strict compatibility checking,
See also
DefaultCheckCompatibility
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 ( THD thd,
const Table table,
const String_type schema_name 
)

Serialize a Table object.

Parameters
thdthread context
tableobject which will be serialized
schema_namename of the schema
Returns
sdi (as json string).

◆ serialize() [3/3]

Sdi_type dd::serialize ( const Tablespace tablespace)

Serialize a Tablespace object.

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