![]() |
MySQL 9.7.0
Source Code Documentation
|
Adaptor class that takes a table with cursor and provides an implementation of MySQL's handler interface. More...
#include <table_with_cursor.h>
Public Types | |
| using | Table_with_cursor_t = Table_with_cursor_tp |
| using | Self_t = Table_handle_adaptor< Table_with_cursor_t > |
| using | Cursor_t = decltype(std::declval< Table_with_cursor_t >().get_cursor()) |
Public Member Functions | |
| Table_handle_adaptor () | |
Static Public Member Functions | |
| static PFS_engine_table_share_proxy & | get_table_share () |
Private Member Functions | |
| int | do_rnd_init () |
Member function implementing rnd_init. More... | |
| int | do_rnd_next () |
Member function implementing rnd_next. More... | |
| int | do_rnd_pos () |
Member function implementing rnd_pos. More... | |
| void | do_read_column_value (PSI_field *field, unsigned int index) |
Member function implementing read_column_value. More... | |
| int | status () const |
Static Private Member Functions | |
| static PFS_engine_table_share_proxy & | init_table_share () |
| static int | rnd_init (PSI_table_handle *opaque_handle, bool) |
Implementation of PFS_engine_table_proxy::rnd_init, matching rnd_init_t. More... | |
| static int | rnd_next (PSI_table_handle *opaque_handle) |
Implementation of PFS_engine_table_proxy::rnd_next, matching rnd_next_t. More... | |
| static int | rnd_pos (PSI_table_handle *opaque_handle) |
Implementation of PFS_engine_table_proxy::rnd_pos, matching rnd_pos_t. More... | |
| static int | read_column_value (PSI_table_handle *opaque_handle, PSI_field *field, unsigned int index) |
Implementation of PFS_engine_table_proxy::read_column_value, matching read_column_value_t. More... | |
| static unsigned long long | get_row_count () |
Implementation of PFS_engine_table_share_proxy::get_row_count, matching get_row_count_t. More... | |
| static PSI_table_handle * | open_table (PSI_pos **opaque_pos) |
Implementation of PFS_engine_table_proxy::open_table, matching open_table_t. More... | |
| static void | close_table (PSI_table_handle *opaque_handle) |
Implementation of PFS_engine_table_proxy::close_table, matching close_table_t. More... | |
| static Self_t & | get_handle_adaptor (PSI_table_handle *opaque_handle) |
| Cast point to PSI_table_handle to reference to Table_handle_adaptor. More... | |
Private Attributes | |
| bool | m_before_first_row {true} |
| True if the current position is "one-before-the-first-row". More... | |
| Table_with_cursor_t | m_table_with_cursor {} |
| Table_with_cursor object representing the table and the current cursor position. More... | |
| Cursor_t | m_begin_cursor |
| Cursor to the first row. More... | |
| Cursor_t | m_current_cursor |
| Current cursor. More... | |
Adaptor class that takes a table with cursor and provides an implementation of MySQL's handler interface.
| using detail::Table_handle_adaptor< Table_with_cursor_tp >::Cursor_t = decltype(std::declval<Table_with_cursor_t>().get_cursor()) |
| using detail::Table_handle_adaptor< Table_with_cursor_tp >::Self_t = Table_handle_adaptor<Table_with_cursor_t> |
| using detail::Table_handle_adaptor< Table_with_cursor_tp >::Table_with_cursor_t = Table_with_cursor_tp |
|
inline |
|
inlinestaticprivate |
Implementation of PFS_engine_table_proxy::close_table, matching close_table_t.
| opaque_handle | Pointer to Table_handle_adaptor object, cast to PSI_table_handle *. |
|
inlineprivate |
Member function implementing read_column_value.
| field | Opaque pointer to the output field. |
| index | The column index. |
|
inlineprivate |
Member function implementing rnd_init.
|
inlineprivate |
Member function implementing rnd_next.
|
inlineprivate |
Member function implementing rnd_pos.
|
inlinestaticprivate |
Cast point to PSI_table_handle to reference to Table_handle_adaptor.
| opaque_handle | PSI_table_handle that actually is a pointer to a Table_handle_adaptor. |
|
inlinestaticprivate |
Implementation of PFS_engine_table_share_proxy::get_row_count, matching get_row_count_t.
|
inlinestatic |
|
inlinestaticprivate |
|
inlinestaticprivate |
Implementation of PFS_engine_table_proxy::open_table, matching open_table_t.
| opaque_pos | Pointer to pointer to opaque "position". *opaque_pos will be set to point to the m_position member of the returned object. |
|
inlinestaticprivate |
Implementation of PFS_engine_table_proxy::read_column_value, matching read_column_value_t.
| opaque_handle | Pointer to Table_handle_adaptor object, cast to PSI_table_handle *. |
| field | PSI_field to which the value should be copied. |
| index | Column number in the table. |
|
inlinestaticprivate |
Implementation of PFS_engine_table_proxy::rnd_init, matching rnd_init_t.
| opaque_handle | Pointer to Table_handle_adaptor object, cast to PSI_table_handle *. |
|
inlinestaticprivate |
Implementation of PFS_engine_table_proxy::rnd_next, matching rnd_next_t.
| opaque_handle | Pointer to Table_handle_adaptor object, cast to PSI_table_handle *. |
|
inlinestaticprivate |
Implementation of PFS_engine_table_proxy::rnd_pos, matching rnd_pos_t.
| opaque_handle | Pointer to Table_handle_adaptor object, cast to PSI_table_handle *. |
|
inlineprivate |
|
private |
True if the current position is "one-before-the-first-row".
The caller expects that rnd_init followed by rnd_next positions the cursor on the first row, thus it has to be initially positioned at "one-before-the-first-row". Since Table_and_row does not have that concept, we identify the position using this flag.
|
private |
Cursor to the first row.
We capture this after initializing the object, and use it to implement rnd_init.
|
private |
Current cursor.
We set this in rnd_next and rnd_init, share the pointer to it with the Optimizer code in the output parameter for open_table, and allow Optimizer to alter it as it needs, as long as the alteration is followed by a call to rnd_pos.
|
private |
Table_with_cursor object representing the table and the current cursor position.