MySQL 8.0.40
Source Code Documentation
|
An abstract base class to enable the implementation of various query rewriters. More...
#include <sql_rewrite.h>
Public Member Functions | |
I_rewriter (THD *thd, Consumer_type type) | |
virtual | ~I_rewriter () |
I_rewriter (const I_rewriter &)=delete | |
const I_rewriter & | operator= (const I_rewriter &)=delete |
I_rewriter (const I_rewriter &&)=delete | |
const I_rewriter & | operator= (const I_rewriter &&)=delete |
void | set_consumer_type (Consumer_type type) |
Reset the previous consumer type. More... | |
Consumer_type | consumer_type () |
Return the current consumer type set in the object. More... | |
virtual bool | rewrite (String &rlb) const =0 |
Protected Attributes | |
THD *const | m_thd |
Consumer_type | m_consumer_type |
An abstract base class to enable the implementation of various query rewriters.
It accepts a THD pointer and the intended target type where the query will to be written. It either sets the thd->rewritten_query with a rewritten query, or clears it if no rewriting took place. Concrete classes must implement the rewrite() method to rewrite the query. Despite concrete classes may accept additional parameters, it is recommended not to create their objects directly.
I_rewriter::I_rewriter | ( | THD * | thd, |
Consumer_type | type | ||
) |
|
virtualdefault |
|
delete |
|
delete |
Consumer_type I_rewriter::consumer_type | ( | ) |
Return the current consumer type set in the object.
Consumer | type set currently. |
|
delete |
|
delete |
|
pure virtual |
Implemented in Rewriter_user, Rewriter_create_user, Rewriter_alter_user, Rewriter_show_create_user, Rewriter_set, Rewriter_set_password, Rewriter_grant, Rewriter_change_replication_source, Rewriter_replica_start, Rewriter_create_server, Rewriter_alter_server, Rewriter_prepare, Rewriter_clone, and Rewriter_start_group_replication.
void I_rewriter::set_consumer_type | ( | Consumer_type | type | ) |
Reset the previous consumer type.
[in] | type | new consumer type for which query is to be rewritten |
|
protected |
|
protected |