MySQL  8.0.17
Source Code Documentation
Table_function Class Referenceabstract

Class representing a table function. More...

#include <table_function.h>

Inheritance diagram for Table_function:
Table_function_json

Public Member Functions

 Table_function (THD *thd_arg)
 
virtual ~Table_function ()
 
bool create_result_table (ulonglong options, const char *table_alias)
 Create, but not instantiate the result table. More...
 
bool write_row ()
 Write current record to the result table and handle overflow to disk. More...
 
Fieldget_field (uint i)
 Returns a field with given index. More...
 
void empty_table ()
 Delete all rows in the table. More...
 
void default_row ()
 Set the default row. More...
 
virtual bool init ()=0
 Initialize table function. More...
 
virtual bool init_args ()
 Initialize table function after the result table has been created. More...
 
virtual bool fill_result_table ()=0
 Execute the table function - fill the result table. More...
 
virtual const char * func_name () const =0
 Returns table function's name. More...
 
virtual table_map used_tables ()
 Return table_map of tables used by the function. More...
 
virtual bool print (String *str, enum_query_type query_type)=0
 Print table function. More...
 
void cleanup ()
 Clean up table function. More...
 
THDget_thd ()
 Retruns thread handler. More...
 
virtual bool walk (Item_processor processor, enum_walk walk, uchar *arg)=0
 

Protected Attributes

THDthd
 Thread handler. More...
 
TABLEtable
 Table function's result table. More...
 
bool inited
 Whether the table funciton was already initialized. More...
 

Private Member Functions

virtual List< Create_field > * get_field_list ()=0
 Get the list of fields to create the result table. More...
 
virtual bool do_init_args ()=0
 Initialize table function's arguments. More...
 
virtual void do_cleanup ()
 

Friends

bool TABLE_LIST::setup_table_function (THD *thd)
 

Detailed Description

Class representing a table function.

Constructor & Destructor Documentation

◆ Table_function()

Table_function::Table_function ( THD thd_arg)
inline

◆ ~Table_function()

virtual Table_function::~Table_function ( )
inlinevirtual

Member Function Documentation

◆ cleanup()

void Table_function::cleanup ( void  )
inline

Clean up table function.

◆ create_result_table()

bool Table_function::create_result_table ( ulonglong  options,
const char *  table_alias 
)

Create, but not instantiate the result table.

Parameters
optionsoptions to create table
table_aliastable's alias
Returns
true on error false on success

◆ default_row()

void Table_function::default_row ( )
inline

Set the default row.

◆ do_cleanup()

virtual void Table_function::do_cleanup ( )
inlineprivatevirtual

Reimplemented in Table_function_json.

◆ do_init_args()

virtual bool Table_function::do_init_args ( )
privatepure virtual

Initialize table function's arguments.

Returns
true on error false on success

Implemented in Table_function_json.

◆ empty_table()

void Table_function::empty_table ( )

Delete all rows in the table.

◆ fill_result_table()

virtual bool Table_function::fill_result_table ( )
pure virtual

Execute the table function - fill the result table.

Returns
true on error false on success

Implemented in Table_function_json.

◆ func_name()

virtual const char* Table_function::func_name ( ) const
pure virtual

Returns table function's name.

Implemented in Table_function_json.

◆ get_field()

Field* Table_function::get_field ( uint  i)
inline

Returns a field with given index.

Parameters
ifield's index
Returns
field with given index

◆ get_field_list()

virtual List<Create_field>* Table_function::get_field_list ( )
privatepure virtual

Get the list of fields to create the result table.

Implemented in Table_function_json.

◆ get_thd()

THD* Table_function::get_thd ( )
inline

Retruns thread handler.

Returns
thread handler

◆ init()

virtual bool Table_function::init ( )
pure virtual

Initialize table function.

Returns
true on error false on success

Implemented in Table_function_json.

◆ init_args()

bool Table_function::init_args ( )
virtual

Initialize table function after the result table has been created.

Returns
true on error false on success

◆ print()

virtual bool Table_function::print ( String str,
enum_query_type  query_type 
)
pure virtual

Print table function.

Parameters
strstring to print to
query_typetype of the query
Returns
true on error false on success

Implemented in Table_function_json.

◆ used_tables()

virtual table_map Table_function::used_tables ( )
inlinevirtual

Return table_map of tables used by the function.

Reimplemented in Table_function_json.

◆ walk()

virtual bool Table_function::walk ( Item_processor  processor,
enum_walk  walk,
uchar arg 
)
pure virtual

Implemented in Table_function_json.

◆ write_row()

bool Table_function::write_row ( )

Write current record to the result table and handle overflow to disk.

Returns
true on error false on success

Friends And Related Function Documentation

◆ TABLE_LIST::setup_table_function

Member Data Documentation

◆ inited

bool Table_function::inited
protected

Whether the table funciton was already initialized.

◆ table

TABLE* Table_function::table
protected

Table function's result table.

◆ thd

THD* Table_function::thd
protected

Thread handler.


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