My Project
Public Types | Public Member Functions | Public Attributes
QEP_operation Class Reference

#include <sql_executor.h>

Inheritance diagram for QEP_operation:
Sql_alloc JOIN_CACHE QEP_tmp_table JOIN_CACHE_BKA JOIN_CACHE_BNL JOIN_CACHE_BKA_UNIQUE

List of all members.

Public Types

enum  enum_op_type { OT_CACHE, OT_TMP_TABLE }

Public Member Functions

 QEP_operation (JOIN_TAB *tab)
virtual enum_op_type type ()=0
virtual int init ()
virtual enum_nested_loop_state put_record ()=0
virtual enum_nested_loop_state end_send ()=0
virtual void free ()

Public Attributes

JOIN_TABjoin_tab

Detailed Description

QEP_operation is an interface class for operations in query execution plan.

Currently following operations are implemented: JOIN_CACHE - caches partial join result and joins with attached table QEP_tmp_table - materializes join result in attached table

An operation's life cycle is as follows: .) it is initialized on the init() call .) accumulates records one by one when put_record() is called. .) finalize record sending when end_send() is called. .) free all internal buffers on the free() call.

Each operation is attached to a join_tab, to which exactly depends on the operation type: JOIN_CACHE is attached to the table following the table being cached, QEP_tmp_buffer is attached to a tmp table.


Member Function Documentation

virtual enum_nested_loop_state QEP_operation::end_send ( ) [pure virtual]

Finalize records sending.

Implemented in JOIN_CACHE, and QEP_tmp_table.

virtual void QEP_operation::free ( ) [inline, virtual]

Internal state cleanup.

Reimplemented in JOIN_CACHE.

virtual int QEP_operation::init ( void  ) [inline, virtual]

Initialize operation's internal state. Called once per query execution.

Reimplemented in JOIN_CACHE_BKA_UNIQUE, JOIN_CACHE_BKA, JOIN_CACHE_BNL, and JOIN_CACHE.

virtual enum_nested_loop_state QEP_operation::put_record ( ) [pure virtual]

Put a new record into the operation's buffer

Returns:
return one of enum_nested_loop_state values.

Implemented in JOIN_CACHE, and QEP_tmp_table.


Member Data Documentation

For JOIN_CACHE : Table to be joined with the partial join records from the cache For JOIN_TMP_BUFFER : join_tab of tmp table


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines