MySQL  8.0.27
Source Code Documentation
opt_explain_json_namespace::unit_ctx Class Reference

Helper base class to host HAVING, ORDER BY and GROUP BY subquery nodes. More...

Inheritance diagram for opt_explain_json_namespace::unit_ctx:
opt_explain_json_namespace::context Explain_context opt_explain_json_namespace::join_ctx opt_explain_json_namespace::union_ctx opt_explain_json_namespace::union_result_ctx opt_explain_json_namespace::duplication_weedout_ctx opt_explain_json_namespace::materialize_ctx opt_explain_json_namespace::sort_ctx opt_explain_json_namespace::window_ctx opt_explain_json_namespace::sort_with_subqueries_ctx

Public Member Functions

 unit_ctx (enum_parsing_context type_arg, const char *name_arg, context *parent_arg)
bool has_no_subqueries () const
 Helper function to distinguish subquery-less nodes. More...
bool format_query_expression (Opt_trace_context *json) override
 Helper function to format output for HAVING, ORDER/GROUP BY subqueries. More...
bool add_subquery (subquery_list_enum subquery_type, subquery_ctx *ctx) override
- Public Member Functions inherited from opt_explain_json_namespace::context
 context (enum_parsing_context type_arg, const char *name_arg, context *parent_arg)
virtual ~context ()=default
virtual bool format (Opt_trace_context *json)
 Pass the node with its child nodes to a JSON formatter. More...
bool is_query_block () const
virtual size_t id (bool hide=false)=0
 Analogue of the "id" column in the traditional EXPLAIN output. More...
virtual bool cacheable ()
virtual bool dependent ()
virtual class qep_rowentry ()
virtual enum_mod_type get_mod_type ()
virtual void set_child (context *)
 Associate a child node with this node. More...
virtual void set_union_result (union_result_ctx *)
 associate CTX_UNION_RESULT node with CTX_UNION node More...
virtual bool add_subquery (subquery_list_enum subquery_type[[maybe_unused]], subquery_ctx *ctx[[maybe_unused]])
 Append a subquery node to the specified list of the unit node. More...
virtual bool format_nested_loop (Opt_trace_context *json[[maybe_unused]])
 Format nested loop join subtree (if any) to JSON formatter. More...
virtual bool add_join_tab (joinable_ctx *ctx[[maybe_unused]])
 Add a CTX_QEP_TAB node to a CTX_JOIN node. More...
virtual void set_sort (sort_ctx *ctx[[maybe_unused]])
 Set nested ORDER BY/GROUP BY/DISTINCT node to ctx. More...
virtual void set_window (window_ctx *ctx[[maybe_unused]])
 Set nested WINDOW node to ctx. More...
virtual bool add_query_spec (context *ctx[[maybe_unused]])
 Add a query specification node to the CTX_UNION node. More...
virtual bool find_and_set_derived (context *subquery[[maybe_unused]])
 Try to associate a derived subquery node with this or underlying node. More...
virtual int add_where_subquery (subquery_ctx *ctx[[maybe_unused]], Query_expression *subquery[[maybe_unused]])
 Associate WHERE subqueries of given context and unit with this object. More...
virtual bool format_derived (Opt_trace_context *)
 Helper function to format output for derived subquery if any. More...
virtual bool format_where (Opt_trace_context *)
 Helper function to format output for associated WHERE subqueries if any. More...
- Public Member Functions inherited from Explain_context
 Explain_context (enum_parsing_context type_arg)

Private Attributes

List< subquery_ctxsubquery_lists [SQ_total]

Additional Inherited Members

- Public Attributes inherited from opt_explain_json_namespace::context
 link to parent node or NULL More...
- Public Attributes inherited from Explain_context
enum_parsing_context type
 type tag More...
- Protected Attributes inherited from opt_explain_json_namespace::context
const char * name

Detailed Description

Helper base class to host HAVING, ORDER BY and GROUP BY subquery nodes.

Constructor & Destructor Documentation

◆ unit_ctx()

opt_explain_json_namespace::unit_ctx::unit_ctx ( enum_parsing_context  type_arg,
const char *  name_arg,
context parent_arg 

Member Function Documentation

◆ add_subquery()

bool opt_explain_json_namespace::unit_ctx::add_subquery ( subquery_list_enum  subquery_type,
subquery_ctx ctx 

◆ format_query_expression()

bool opt_explain_json_namespace::unit_ctx::format_query_expression ( Opt_trace_context )

Helper function to format output for HAVING, ORDER/GROUP BY subqueries.

Reimplemented from opt_explain_json_namespace::context.

Reimplemented in opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::union_result_ctx.

◆ has_no_subqueries()

bool opt_explain_json_namespace::unit_ctx::has_no_subqueries ( ) const

Helper function to distinguish subquery-less nodes.

Return values
trueNode hosts no subqueries
falseNode hosts some subqueries

Member Data Documentation

◆ subquery_lists

List<subquery_ctx> opt_explain_json_namespace::unit_ctx::subquery_lists[SQ_total]

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