25#ifndef MYSQL_COMMAND_DELEGATES_H
26#define MYSQL_COMMAND_DELEGATES_H
276 unsigned int statement_warn_count,
277 unsigned long long affected_rows,
278 unsigned long long last_insert_id,
279 const char *
const message) = 0;
289 const char *
const sqlstate) = 0;
350 unsigned int unsigned_flag) {
372 unsigned int decimals) {
378 unsigned int decimals) {
391 uint statement_warn_count,
ulonglong affected_rows,
393 const char *
const message) {
396 context->
handle_ok(server_status, statement_warn_count, affected_rows,
397 last_insert_id, message);
401 const char *
const err_msg,
402 const char *
const sqlstate) {
447 int get_double(
double value,
unsigned int decimals)
override;
458 void handle_ok(
unsigned int server_status,
unsigned int statement_warn_count,
459 unsigned long long affected_rows,
460 unsigned long long last_insert_id,
461 const char *
const message)
override;
463 void handle_error(uint sql_errno,
const char *
const err_msg,
464 const char *
const sqlstate)
override;
Definition: mysql_command_delegates.h:414
int start_result_metadata(uint32_t num_cols, uint32_t flags, const CHARSET_INFO *resultcs) override
Definition: mysql_command_delegates.cc:46
int get_string(const char *const value, size_t length, const CHARSET_INFO *const valuecs) override
Definition: mysql_command_delegates.cc:147
enum cs_text_or_binary representation() const
Definition: mysql_command_delegates.h:426
void abort_row() override
Definition: mysql_command_delegates.cc:82
int get_double(double value, unsigned int decimals) override
Definition: mysql_command_delegates.cc:119
ulong get_client_capabilities() override
Definition: mysql_command_delegates.cc:87
int get_datetime(const MYSQL_TIME *value, unsigned int decimals) override
Definition: mysql_command_delegates.cc:139
int get_null() override
Definition: mysql_command_delegates.cc:96
int get_date(const MYSQL_TIME *value) override
Definition: mysql_command_delegates.cc:124
Callback_command_delegate(void *srv, SRV_CTX_H srv_ctx_h)
Definition: mysql_command_delegates.cc:42
int end_row() override
Definition: mysql_command_delegates.cc:77
int get_time(const MYSQL_TIME *value, unsigned int decimals) override
Definition: mysql_command_delegates.cc:131
int start_row() override
Definition: mysql_command_delegates.cc:72
int get_longlong(longlong value, unsigned int unsigned_flag) override
Definition: mysql_command_delegates.cc:106
void handle_ok(unsigned int server_status, unsigned int statement_warn_count, unsigned long long affected_rows, unsigned long long last_insert_id, const char *const message) override
Definition: mysql_command_delegates.cc:154
int get_decimal(const decimal_t *value) override
Definition: mysql_command_delegates.cc:112
int field_metadata(struct st_send_field *field, const CHARSET_INFO *charset) override
Definition: mysql_command_delegates.cc:53
int get_integer(longlong value) override
Definition: mysql_command_delegates.cc:101
void handle_error(uint sql_errno, const char *const err_msg, const char *const sqlstate) override
Definition: mysql_command_delegates.cc:171
int end_result_metadata(uint server_status, uint warn_count) override
Definition: mysql_command_delegates.cc:65
Definition: mysql_command_delegates.h:37
virtual int get_datetime(const MYSQL_TIME *value, uint decimals)=0
virtual int start_result_metadata(uint32_t num_cols, uint32_t flags, const CHARSET_INFO *resultcs)=0
virtual int get_string(const char *const value, size_t length, const CHARSET_INFO *const valuecs)=0
virtual ~Command_delegate()
Definition: mysql_command_delegates.cc:40
virtual void handle_error(uint sql_errno, const char *const err_msg, const char *const sqlstate)=0
static void call_handle_error(void *ctx, uint sql_errno, const char *const err_msg, const char *const sqlstate)
Definition: mysql_command_delegates.h:400
virtual int get_time(const MYSQL_TIME *value, uint decimals)=0
static int call_get_null(void *ctx)
Definition: mysql_command_delegates.h:339
virtual void shutdown(int flag)
Definition: mysql_command_delegates.h:293
virtual int get_integer(longlong value)=0
static int call_get_string(void *ctx, const char *const value, size_t length, const CHARSET_INFO *const valuecs)
Definition: mysql_command_delegates.h:383
Command_delegate & operator=(Command_delegate &&)=default
st_command_service_cbs m_callbacks
Definition: mysql_command_delegates.h:75
Command_delegate(Command_delegate &&)=default
static int call_end_result_metadata(void *ctx, uint server_status, uint warn_count)
Definition: mysql_command_delegates.h:309
virtual ulong get_client_capabilities()=0
static void call_shutdown(void *ctx, int flag)
Definition: mysql_command_delegates.h:408
static int call_get_longlong(void *ctx, longlong value, unsigned int unsigned_flag)
Definition: mysql_command_delegates.h:349
virtual int start_row()=0
SRV_CTX_H m_srv_ctx_h
Definition: mysql_command_delegates.h:74
Command_delegate(const Command_delegate &)=default
static int call_field_metadata(void *ctx, struct st_send_field *field, const CHARSET_INFO *charset)
Definition: mysql_command_delegates.h:303
static int call_start_result_metadata(void *ctx, uint num_cols, uint flags, const CHARSET_INFO *resultcs)
Definition: mysql_command_delegates.h:296
static ulong call_get_client_capabilities(void *ctx)
Definition: mysql_command_delegates.h:334
static int call_get_integer(void *ctx, longlong value)
Definition: mysql_command_delegates.h:344
virtual void handle_ok(unsigned int server_status, unsigned int statement_warn_count, unsigned long long affected_rows, unsigned long long last_insert_id, const char *const message)=0
static void call_handle_ok(void *ctx, uint server_status, uint statement_warn_count, ulonglong affected_rows, ulonglong last_insert_id, const char *const message)
Definition: mysql_command_delegates.h:390
static int call_get_datetime(void *ctx, const MYSQL_TIME *value, unsigned int decimals)
Definition: mysql_command_delegates.h:377
Command_delegate(void *srv, SRV_CTX_H srv_ctx_h)
Definition: mysql_command_delegates.cc:34
void * m_srv
Definition: mysql_command_delegates.h:73
virtual int get_double(double value, uint32 decimals)=0
const st_command_service_cbs * callbacks() const
Definition: mysql_command_delegates.h:47
static int call_get_double(void *ctx, double value, unsigned int decimals)
Definition: mysql_command_delegates.h:361
static void call_abort_row(void *ctx)
Definition: mysql_command_delegates.h:329
virtual int get_decimal(const decimal_t *value)=0
virtual int get_longlong(longlong value, uint32_t unsigned_flag)=0
static int call_end_row(void *ctx)
Definition: mysql_command_delegates.h:323
static int call_get_date(void *ctx, const MYSQL_TIME *value)
Definition: mysql_command_delegates.h:366
static int call_get_decimal(void *ctx, const decimal_t *value)
Definition: mysql_command_delegates.h:356
virtual int get_date(const MYSQL_TIME *value)=0
virtual int field_metadata(struct st_send_field *field, const CHARSET_INFO *charset)=0
virtual int end_result_metadata(uint server_status, uint warn_count)=0
static int call_start_row(void *ctx)
Definition: mysql_command_delegates.h:317
static int call_get_time(void *ctx, const MYSQL_TIME *value, unsigned int decimals)
Definition: mysql_command_delegates.h:371
virtual void abort_row()=0
Command_delegate & operator=(const Command_delegate &)=default
static int flags[50]
Definition: hp_test1.cc:40
static int flag
Definition: hp_test1.cc:40
A better implementation of the UNIX ctype(3) library.
Header for compiler-dependent features.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
long long int longlong
Definition: my_inttypes.h:55
uint32_t uint32
Definition: my_inttypes.h:67
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
struct SRV_CTX_H_imp * SRV_CTX_H
Definition: mysql_command_consumer.h:31
const std::string charset("charset")
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: srv0dynamic_procedures.h:48
Header file for the Command service.
cs_text_or_binary
Definition: service_command.h:389
@ CS_BINARY_REPRESENTATION
Definition: service_command.h:391
Definition: m_ctype.h:421
Definition: mysql_time.h:82
Base struct used to represent decimal data type.
Definition: decimal.h:49
Definition: service_command.h:328
Definition: service_command.h:45