MySQL 9.1.0
Source Code Documentation
|
#include <sql_service_context.h>
Public Member Functions | |
Sql_service_context (Sql_resultset *rset) | |
~Sql_service_context () override=default | |
int | start_result_metadata (uint num_cols, uint flags, const CHARSET_INFO *resultcs) override |
Getting metadata. More... | |
int | field_metadata (struct st_send_field *field, const CHARSET_INFO *charset) override |
Field metadata is provided via this callback. More... | |
int | end_result_metadata (uint server_status, uint warn_count) override |
Indicates end of metadata for the result set. More... | |
int | start_row () override |
Indicates the beginning of a new row in the result set/metadata. More... | |
int | end_row () override |
Indicates end of the row in the result set/metadata. More... | |
void | abort_row () override |
An error occurred during execution. More... | |
ulong | get_client_capabilities () override |
Return client's capabilities (see mysql_com.h, CLIENT_*) More... | |
int | get_null () override |
Getting data. More... | |
int | get_integer (longlong value) override |
Get TINY/SHORT/LONG value from server. More... | |
int | get_longlong (longlong value, uint is_unsigned) override |
Get LONGLONG value from server. More... | |
int | get_decimal (const decimal_t *value) override |
Receive DECIMAL value from server. More... | |
int | get_double (double value, uint32 decimals) override |
Receive DOUBLE value from server. More... | |
int | get_date (const MYSQL_TIME *value) override |
Get DATE value from server. More... | |
int | get_time (const MYSQL_TIME *value, uint decimals) override |
Get TIME value from server. More... | |
int | get_datetime (const MYSQL_TIME *value, uint decimals) override |
Get DATETIME value from server. More... | |
int | get_string (const char *const value, size_t length, const CHARSET_INFO *const valuecs) override |
Get STRING value from server. More... | |
void | handle_ok (uint server_status, uint statement_warn_count, ulonglong affected_rows, ulonglong last_insert_id, const char *const message) override |
Getting execution status. More... | |
void | handle_error (uint sql_errno, const char *const err_msg, const char *const sqlstate) override |
Command ended with ERROR. More... | |
void | shutdown (int flag) override |
Session was shutdown while command was running. More... | |
bool | connection_alive () override |
Check if the connection is still alive. More... | |
Public Member Functions inherited from Sql_service_context_base | |
Sql_service_context_base ()=default | |
Sql_service_context_base constructor resets all variables. More... | |
virtual | ~Sql_service_context_base ()=default |
Private Attributes | |
Sql_resultset * | resultset |
Additional Inherited Members | |
Static Public Attributes inherited from Sql_service_context_base | |
static const st_command_service_cbs | sql_service_callbacks |
The sql service callbacks that will call the below virtual methods. More... | |
|
inline |
|
overridedefault |
|
overridevirtual |
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.
Implements Sql_service_context_base.
|
inlineoverridevirtual |
Check if the connection is still alive.
Implements Sql_service_context_base.
|
overridevirtual |
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 |
Implements Sql_service_context_base.
|
overridevirtual |
Indicates end of the row in the result set/metadata.
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Field metadata is provided via this callback.
field | Field's metadata (see field.h) |
charset | Field's charset |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Return client's capabilities (see mysql_com.h, CLIENT_*)
Implements Sql_service_context_base.
|
overridevirtual |
Get DATE value from server.
value | Value received |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Get DATETIME value from server.
value | Value received |
decimals | Number of decimals |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Receive DECIMAL value from server.
value | Value received |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Receive DOUBLE value from server.
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Get TINY/SHORT/LONG value from server.
value | Value received |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Get LONGLONG value from server.
value | Value received |
is_unsigned | TRUE <=> value is unsigned |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Getting data.
Receive NULL value from server
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Get STRING value from server.
value | Value received |
length | Value's length |
valuecs | Value's charset |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Get TIME value from server.
value | Value received |
decimals | Number of decimals |
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
overridevirtual |
Command ended with ERROR.
sql_errno | Error code |
err_msg | Error message |
sqlstate | SQL state correspongin to the error code |
Implements Sql_service_context_base.
|
overridevirtual |
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 |
Implements Sql_service_context_base.
|
overridevirtual |
Session was shutdown while command was running.
Implements Sql_service_context_base.
|
overridevirtual |
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 |
Implements Sql_service_context_base.
|
overridevirtual |
Indicates the beginning of a new row in the result set/metadata.
1 | Error |
0 | OK |
Implements Sql_service_context_base.
|
private |