MySQL 8.0.39
Source Code Documentation
|
#include <sql_service_context_base.h>
Public Member Functions | |
Sql_service_context_base ()=default | |
Sql_service_context_base constructor resets all variables. More... | |
virtual | ~Sql_service_context_base ()=default |
virtual int | start_result_metadata (uint num_cols, uint flags, const CHARSET_INFO *resultcs)=0 |
Getting metadata. More... | |
virtual int | field_metadata (struct st_send_field *field, const CHARSET_INFO *charset)=0 |
Field metadata is provided via this callback. More... | |
virtual int | end_result_metadata (uint server_status, uint warn_count)=0 |
Indicates end of metadata for the result set. More... | |
virtual int | start_row ()=0 |
Indicates the beginning of a new row in the result set/metadata. More... | |
virtual int | end_row ()=0 |
Indicates end of the row in the result set/metadata. More... | |
virtual void | abort_row ()=0 |
An error occurred during execution. More... | |
virtual ulong | get_client_capabilities ()=0 |
Return client's capabilities (see mysql_com.h, CLIENT_*) More... | |
virtual int | get_null ()=0 |
Getting data. More... | |
virtual int | get_integer (longlong value)=0 |
Get TINY/SHORT/LONG value from server. More... | |
virtual int | get_longlong (longlong value, uint is_unsigned)=0 |
Get LONGLONG value from server. More... | |
virtual int | get_decimal (const decimal_t *value)=0 |
Receive DECIMAL value from server. More... | |
virtual int | get_double (double value, uint32 decimals)=0 |
virtual int | get_date (const MYSQL_TIME *value)=0 |
Get DATE value from server. More... | |
virtual int | get_time (const MYSQL_TIME *value, uint decimals)=0 |
Get TIME value from server. More... | |
virtual int | get_datetime (const MYSQL_TIME *value, uint decimals)=0 |
Get DATETIME value from server. More... | |
virtual int | get_string (const char *const value, size_t length, const CHARSET_INFO *const valuecs)=0 |
Get STRING value from server. More... | |
virtual void | handle_ok (uint server_status, uint statement_warn_count, ulonglong affected_rows, ulonglong last_insert_id, const char *const message)=0 |
Getting execution status. More... | |
virtual void | handle_error (uint sql_errno, const char *const err_msg, const char *const sqlstate)=0 |
Command ended with ERROR. More... | |
virtual void | shutdown (int flag)=0 |
Session was shutdown while command was running. More... | |
virtual bool | connection_alive ()=0 |
Check if the connection is still alive. More... | |
Static Public Attributes | |
static const st_command_service_cbs | sql_service_callbacks |
The sql service callbacks that will call the below virtual methods. More... | |
Static Private Member Functions | |
static int | sql_start_result_metadata (void *ctx, uint num_cols, uint flags, const CHARSET_INFO *resultcs) |
static int | sql_field_metadata (void *ctx, struct st_send_field *field, const CHARSET_INFO *charset) |
static int | sql_end_result_metadata (void *ctx, uint server_status, uint warn_count) |
static int | sql_start_row (void *ctx) |
static int | sql_end_row (void *ctx) |
static void | sql_abort_row (void *ctx) |
static ulong | sql_get_client_capabilities (void *ctx) |
static int | sql_get_null (void *ctx) |
static int | sql_get_integer (void *ctx, longlong value) |
static int | sql_get_longlong (void *ctx, longlong value, uint is_unsigned) |
static int | sql_get_decimal (void *ctx, const decimal_t *value) |
static int | sql_get_double (void *ctx, double value, uint32 decimals) |
static int | sql_get_date (void *ctx, const MYSQL_TIME *value) |
static int | sql_get_time (void *ctx, const MYSQL_TIME *value, uint decimals) |
static int | sql_get_datetime (void *ctx, const MYSQL_TIME *value, uint decimals) |
static int | sql_get_string (void *ctx, const char *const value, size_t length, const CHARSET_INFO *const valuecs) |
static void | sql_handle_ok (void *ctx, uint server_status, uint statement_warn_count, ulonglong affected_rows, ulonglong last_insert_id, const char *const message) |
static void | sql_handle_error (void *ctx, uint sql_errno, const char *const err_msg, const char *const sqlstate) |
static void | sql_shutdown (void *ctx, int flag) |
static bool | sql_connection_alive (void *ctx) |
|
default |
Sql_service_context_base constructor resets all variables.
|
virtualdefault |
|
pure virtual |
An error occurred during execution.
This callback indicates that an error occurreded during command execution and the partial row should be dropped. Server will raise error and return.
Implemented in Sql_service_context.
|
pure virtual |
Check if the connection is still alive.
It should always return true unless the protocol closed the connection.
Implemented in Sql_service_context.
|
pure virtual |
Indicates end of metadata for the result set.
server_status | Status of server (see mysql_com.h SERVER_STATUS_*) |
warn_count | Number of warnings thrown during execution |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Indicates end of the row in the result set/metadata.
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Field metadata is provided via this callback.
field | Field's metadata (see field.h) |
charset | Field's charset |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Return client's capabilities (see mysql_com.h, CLIENT_*)
Implemented in Sql_service_context.
|
pure virtual |
Get DATE value from server.
value | Value received |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Get DATETIME value from server.
value | Value received |
decimals | Number of decimals |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Receive DECIMAL value from server.
value | Value received |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
|
pure virtual |
Get TINY/SHORT/LONG value from server.
value | Value received |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Get LONGLONG value from server.
value | Value received |
is_unsigned | TRUE <=> value is unsigned |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Getting data.
Receive NULL value from server
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Get STRING value from server.
value | Value received |
length | Value's length |
valuecs | Value's charset |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Get TIME value from server.
value | Value received |
decimals | Number of decimals |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Command ended with ERROR.
sql_errno | Error code |
err_msg | Error message |
sqlstate | SQL state corresponding to the error code |
Implemented in Sql_service_context.
|
pure virtual |
Getting execution status.
Command ended with success
server_status | Status of server (see mysql_com.h, SERVER_STATUS_*) |
statement_warn_count | Number of warnings thrown during execution |
affected_rows | Number of rows affected by the command |
last_insert_id | Last insert id being assigned during execution |
message | A message from server |
Implemented in Sql_service_context.
|
pure virtual |
Session was shutdown while command was running.
Implemented in Sql_service_context.
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
pure virtual |
Getting metadata.
Indicates start of metadata for the result set
num_cols | Number of fields being sent |
flags | Flags to alter the metadata sending |
resultcs | Charset of the result set |
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
pure virtual |
Indicates the beginning of a new row in the result set/metadata.
1 | Error |
0 | OK |
Implemented in Sql_service_context.
|
static |
The sql service callbacks that will call the below virtual methods.