MySQL 9.0.0
Source Code Documentation
pfs_example_employee_salary.h File Reference
#include <mysql/components/service_implementation.h>
#include <mysql/components/services/pfs_plugin_table_service.h>
#include <mysql/plugin.h>
#include <algorithm>
#include <vector>

Go to the source code of this file.

Classes

struct  Esalary_Record
 
class  Esalary_POS
 
struct  Esalary_Table_Handle
 

Functions

PSI_table_handleesalary_open_table (PSI_pos **pos)
 Instantiate Esalary_Table_Handle at plugin code when corresponding table in performance schema is opened. More...
 
void esalary_close_table (PSI_table_handle *handle)
 Destroy the Esalary_Table_Handle at plugin code when corresponding table in performance schema is closed. More...
 
int esalary_rnd_next (PSI_table_handle *handle)
 
int esalary_rnd_init (PSI_table_handle *h, bool scan)
 
int esalary_rnd_pos (PSI_table_handle *handle)
 
int esalary_index_init (PSI_table_handle *handle, uint idx, bool sorted, PSI_index_handle **index)
 
int esalary_index_read (PSI_index_handle *index, PSI_key_reader *reader, unsigned int idx, int find_flag)
 
int esalary_index_next (PSI_table_handle *handle)
 
void esalary_reset_position (PSI_table_handle *handle)
 
int esalary_read_column_value (PSI_table_handle *handle, PSI_field *field, uint index)
 
int esalary_write_row_values (PSI_table_handle *handle)
 
int esalary_write_column_value (PSI_table_handle *handle, PSI_field *field, unsigned int index)
 
int esalary_update_row_values (PSI_table_handle *handle)
 
int esalary_update_column_value (PSI_table_handle *handle, PSI_field *field, unsigned int index)
 
int esalary_delete_row_values (PSI_table_handle *handle)
 
int esalary_delete_all_rows (void)
 
unsigned long long esalary_get_row_count (void)
 
void init_esalary_share (PFS_engine_table_share_proxy *share)
 

Variables

const mysql_service_pfs_plugin_column_integer_v1_tcol_int_svc
 
const mysql_service_pfs_plugin_column_bigint_v1_tcol_bigint_svc
 
const mysql_service_pfs_plugin_column_date_v1_tcol_date_svc
 
const mysql_service_pfs_plugin_column_time_v1_tcol_time_svc
 
PFS_engine_table_share_proxy esalary_st_share
 
mysql_mutex_t LOCK_esalary_records_array
 
std::vector< Esalary_Recordesalary_records_vector
 An array to keep rows of the tables. More...
 

Function Documentation

◆ esalary_close_table()

void esalary_close_table ( PSI_table_handle handle)

Destroy the Esalary_Table_Handle at plugin code when corresponding table in performance schema is closed.

◆ esalary_delete_all_rows()

int esalary_delete_all_rows ( void  )

◆ esalary_delete_row_values()

int esalary_delete_row_values ( PSI_table_handle handle)

◆ esalary_get_row_count()

unsigned long long esalary_get_row_count ( void  )

◆ esalary_index_init()

int esalary_index_init ( PSI_table_handle handle,
uint  idx,
bool  sorted,
PSI_index_handle **  index 
)

◆ esalary_index_next()

int esalary_index_next ( PSI_table_handle handle)

◆ esalary_index_read()

int esalary_index_read ( PSI_index_handle index,
PSI_key_reader reader,
unsigned int  idx,
int  find_flag 
)

◆ esalary_open_table()

PSI_table_handle * esalary_open_table ( PSI_pos **  pos)

Instantiate Esalary_Table_Handle at plugin code when corresponding table in performance schema is opened.

◆ esalary_read_column_value()

int esalary_read_column_value ( PSI_table_handle handle,
PSI_field field,
uint  index 
)

◆ esalary_reset_position()

void esalary_reset_position ( PSI_table_handle handle)

◆ esalary_rnd_init()

int esalary_rnd_init ( PSI_table_handle h,
bool  scan 
)

◆ esalary_rnd_next()

int esalary_rnd_next ( PSI_table_handle handle)

◆ esalary_rnd_pos()

int esalary_rnd_pos ( PSI_table_handle handle)

◆ esalary_update_column_value()

int esalary_update_column_value ( PSI_table_handle handle,
PSI_field field,
unsigned int  index 
)

◆ esalary_update_row_values()

int esalary_update_row_values ( PSI_table_handle handle)

◆ esalary_write_column_value()

int esalary_write_column_value ( PSI_table_handle handle,
PSI_field field,
unsigned int  index 
)

◆ esalary_write_row_values()

int esalary_write_row_values ( PSI_table_handle handle)

◆ init_esalary_share()

void init_esalary_share ( PFS_engine_table_share_proxy share)

Variable Documentation

◆ col_bigint_svc

const mysql_service_pfs_plugin_column_bigint_v1_t* col_bigint_svc
extern

◆ col_date_svc

const mysql_service_pfs_plugin_column_date_v1_t* col_date_svc
extern

◆ col_int_svc

◆ col_time_svc

const mysql_service_pfs_plugin_column_time_v1_t* col_time_svc
extern

◆ esalary_records_vector

std::vector<Esalary_Record> esalary_records_vector
extern

An array to keep rows of the tables.

When a row is inserted in plugin table, it will be stored here. When a row is queried from plugin table, it will be fetched from here.

◆ esalary_st_share

PFS_engine_table_share_proxy esalary_st_share
extern

◆ LOCK_esalary_records_array

mysql_mutex_t LOCK_esalary_records_array
extern