Functions for serializing (with complete header) and deserializing the dd object which supports this.
More...
|
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...
|
|
bool | dd::CheckDefaultCompatibility (const RJ_Document &doc) |
| Default checker which implements the traditional (strict) compatibility check: MYSQL_VERSION less than or equal, dd_version equal, and sdi_version equal. More...
|
|
template<class Dd_type > |
bool | dd::generic_deserialize (THD *thd, const Sdi_type &sdi, const String_type &object_type_name, Dd_type *dst, const SdiCompatibilityChecker &comp_checker, String_type *schema_name_from_sdi) |
|
bool | dd::deserialize (THD *thd, const Sdi_type &sdi, Table *dst_table, SdiCompatibilityChecker comp_checker, String_type *deser_schema_name) |
| Deserialize a dd::Table object. More...
|
|
bool | dd::deserialize (THD *thd, const Sdi_type &sdi, Tablespace *dst_tablespace, SdiCompatibilityChecker comp_checker) |
| Deserialize a dd::Tablespace object. More...
|
|
Functions for serializing (with complete header) and deserializing the dd object which supports this.
◆ SdiCompatibilityChecker
Type alias for std::function wrapping a callable to check if SDI, as an RJ_Document, is compatible.
Normal MySQL error handling. Return value: false => success, true => error in DA.
◆ CheckDefaultCompatibility()
bool dd::CheckDefaultCompatibility |
( |
const RJ_Document & |
doc | ) |
|
Default checker which implements the traditional (strict) compatibility check: MYSQL_VERSION less than or equal, dd_version equal, and sdi_version equal.
◆ deserialize() [1/4]
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
-
thd | thread context |
sdi | serialized representation of schema (as a json string) |
dst_table | empty top-level object |
comp_checker | callable which will be used to determine if the SDI is compatible |
deser_schema_name | name of schema containing the table |
- Returns
- error status
- Return values
-
false | if successful |
true | otherwise |
◆ deserialize() [2/4]
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
-
thd | thread context |
sdi | serialized representation of schema (as a json string) |
table | empty top-level object |
deser_schema_name | name of schema containing the table |
- Returns
- error status
- Return values
-
false | if successful |
true | otherwise |
◆ deserialize() [3/4]
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
-
thd | thread context |
sdi | serialized representation of schema (as a json string) |
dst_tablespace | empty top-level object |
comp_checker | callable which will be used to determine if the SDI is compatible. |
- Returns
- error status
- Return values
-
false | if successful |
true | otherwise |
◆ deserialize() [4/4]
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
-
thd | thread context |
sdi | serialized representation of schema (as a json string) |
tablespace | empty top-level object |
- Returns
- error status
- Return values
-
false | if successful |
true | otherwise |
◆ generic_deserialize()
◆ serialize() [1/3]
Serialize a Schema object.
- Parameters
-
schema | dobject which will be serialized |
- Returns
- sdi (as json string).
◆ serialize() [2/3]
Serialize a Tablespace object.
- Parameters
-
tablespace | object which will be serialized |
- Returns
- sdi (as json string).
◆ serialize() [3/3]
Serialize a Table object.
- Parameters
-
thd | thread context |
table | object which will be serialized |
schema_name | name of the schema |
- Returns
- sdi (as json string).