MySQL 9.1.0
Source Code Documentation
mysql_statement_service_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_STATEMENT_SERVICE_IMP_H
25#define MYSQL_STATEMENT_SERVICE_IMP_H
26
31#include "field_types.h"
33
35 public:
36 static DEFINE_BOOL_METHOD(init, (my_h_statement * stmt_handle));
37
38 static DEFINE_BOOL_METHOD(close, (my_h_statement stmt_handle));
39};
40
42 public:
44 mysql_cstring_with_length name, void *value));
45
48 const void *value));
49};
50
52 public:
54 (my_h_statement statement, uint32_t index,
55 bool is_null, uint64_t type, bool is_unsigned,
56 const void *data, unsigned long data_length,
57 const char *name, unsigned long name_length));
58};
59
61 public:
62 static DEFINE_BOOL_METHOD(execute, (my_h_statement stmt_handle));
64 my_h_statement stmt_handle));
66};
67
69 public:
71 my_h_statement stmt_handle));
72};
73
75 public:
77 uint32_t *parameter_count));
78
80 (my_h_statement statement, uint32_t index,
81 const char *member, void *data));
82};
83
85 public:
87 (my_h_statement statement, bool *has_next));
88
90};
91
93 public:
95 (my_h_statement statement, uint32_t column_index,
96 my_h_field *field));
97
99 (my_h_statement statement, uint32_t *num_fields));
100
102 (my_h_field field, const char *name, void *data));
103};
104
106 public:
108 (my_h_statement statement, uint64_t *num_rows));
110 (my_h_statement statement, uint64_t *retval));
112 (my_h_statement stmt_handle, uint64_t *error_id));
113
114 static DEFINE_BOOL_METHOD(error, (my_h_statement stmt_handle,
115 mysql_cstring_with_length *error_message));
116
117 static DEFINE_BOOL_METHOD(
118 sqlstate, (my_h_statement stmt_handle,
119 mysql_cstring_with_length *sqlstate_error_message));
120
122 (my_h_statement stmt_handle, uint32_t *count));
123
125 (my_h_statement stmt_handle, uint32_t warning_index,
127
129 (my_h_warning warning, uint32_t *level));
130
132 (my_h_warning warning, uint32_t *code));
133
136 mysql_cstring_with_length *error_message));
137};
138
140 public:
141 static DEFINE_BOOL_METHOD(get, (my_h_row row, uint32_t column_index,
142 int64_t *data, bool *is_null));
143};
144
146 public:
147 static DEFINE_BOOL_METHOD(get, (my_h_row row, uint32_t column_index,
148 uint64_t *data, bool *is_null));
149};
150
152 public:
153 static DEFINE_BOOL_METHOD(get, (my_h_row row, uint32_t column_index,
154 double *data, bool *is_null));
155};
156
158 public:
159 static DEFINE_BOOL_METHOD(get, (my_h_row row, uint32_t column_index,
160 mle_time *time, bool *is_null));
161};
162
164 public:
165 static DEFINE_BOOL_METHOD(get,
166 (my_h_row row, uint32_t column_index,
167 mysql_cstring_with_length *data, bool *is_null));
168};
169
170#endif /* MYSQL_STATEMENT_SERVICE_IMP_H */
Definition: mysql_statement_service_imp.h:41
static mysql_service_status_t get(my_h_statement statement, mysql_cstring_with_length name, void *value) noexcept
Definition: mysql_statement_service_imp.cc:360
static mysql_service_status_t set(my_h_statement statement, mysql_cstring_with_length name, const void *value) noexcept
Definition: mysql_statement_service_imp.cc:402
Definition: mysql_statement_service_imp.h:51
static mysql_service_status_t bind_param(my_h_statement statement, uint32_t index, bool is_null, uint64_t type, bool is_unsigned, const void *data, unsigned long data_length, const char *name, unsigned long name_length) noexcept
Definition: mysql_statement_service_imp.cc:331
Definition: mysql_statement_service_imp.h:105
static mysql_service_status_t error_id(my_h_statement stmt_handle, uint64_t *error_id) noexcept
Definition: mysql_statement_service_imp.cc:639
static mysql_service_status_t warning_message(my_h_warning warning, mysql_cstring_with_length *error_message) noexcept
Definition: mysql_statement_service_imp.cc:744
static mysql_service_status_t warning_level(my_h_warning warning, uint32_t *level) noexcept
Definition: mysql_statement_service_imp.cc:725
static mysql_service_status_t get_warning(my_h_statement stmt_handle, uint32_t warning_index, my_h_warning *warning) noexcept
Definition: mysql_statement_service_imp.cc:709
static mysql_service_status_t insert_id(my_h_statement statement, uint64_t *retval) noexcept
Definition: mysql_statement_service_imp.cc:696
static mysql_service_status_t warning_code(my_h_warning warning, uint32_t *code) noexcept
Definition: mysql_statement_service_imp.cc:734
static mysql_service_status_t affected_rows(my_h_statement statement, uint64_t *num_rows) noexcept
Definition: mysql_statement_service_imp.cc:684
static mysql_service_status_t sqlstate(my_h_statement stmt_handle, mysql_cstring_with_length *sqlstate_error_message) noexcept
Definition: mysql_statement_service_imp.cc:663
static mysql_service_status_t num_warnings(my_h_statement stmt_handle, uint32_t *count) noexcept
Definition: mysql_statement_service_imp.cc:674
static mysql_service_status_t error(my_h_statement stmt_handle, mysql_cstring_with_length *error_message) noexcept
Definition: mysql_statement_service_imp.cc:651
Definition: mysql_statement_service_imp.h:68
static mysql_service_status_t execute(mysql_cstring_with_length query, my_h_statement stmt_handle) noexcept
Definition: mysql_statement_service_imp.cc:500
Definition: mysql_statement_service_imp.h:60
static mysql_service_status_t execute(my_h_statement stmt_handle) noexcept
Definition: mysql_statement_service_imp.cc:470
static mysql_service_status_t reset(my_h_statement statement) noexcept
Definition: mysql_statement_service_imp.cc:480
static mysql_service_status_t prepare(mysql_cstring_with_length query, my_h_statement stmt_handle) noexcept
Definition: mysql_statement_service_imp.cc:429
Definition: mysql_statement_service_imp.h:34
static mysql_service_status_t close(my_h_statement stmt_handle) noexcept
Definition: mysql_statement_service_imp.cc:73
static mysql_service_status_t init(my_h_statement *stmt_handle) noexcept
Definition: mysql_statement_service_imp.cc:62
Definition: mysql_statement_service_imp.h:151
static mysql_service_status_t get(my_h_row row, uint32_t column_index, double *data, bool *is_null) noexcept
Definition: mysql_statement_service_imp.cc:790
Definition: mysql_statement_service_imp.h:139
static mysql_service_status_t get(my_h_row row, uint32_t column_index, int64_t *data, bool *is_null) noexcept
Definition: mysql_statement_service_imp.cc:754
Definition: mysql_statement_service_imp.h:163
static mysql_service_status_t get(my_h_row row, uint32_t column_index, mysql_cstring_with_length *data, bool *is_null) noexcept
Definition: mysql_statement_service_imp.cc:855
Definition: mysql_statement_service_imp.h:157
static mysql_service_status_t get(my_h_row row, uint32_t column_index, mle_time *time, bool *is_null) noexcept
Definition: mysql_statement_service_imp.cc:837
Definition: mysql_statement_service_imp.h:145
static mysql_service_status_t get(my_h_row row, uint32_t column_index, uint64_t *data, bool *is_null) noexcept
Definition: mysql_statement_service_imp.cc:772
Definition: mysql_statement_service_imp.h:74
static mysql_service_status_t param_metadata(my_h_statement statement, uint32_t index, const char *member, void *data) noexcept
Definition: mysql_statement_service_imp.cc:171
static mysql_service_status_t param_count(my_h_statement statement, uint32_t *parameter_count) noexcept
Definition: mysql_statement_service_imp.cc:82
Definition: mysql_statement_service_imp.h:84
static mysql_service_status_t fetch(my_h_statement statement, my_h_row *row) noexcept
Definition: mysql_statement_service_imp.cc:542
static mysql_service_status_t next_result(my_h_statement statement, bool *has_next) noexcept
Definition: mysql_statement_service_imp.cc:528
Definition: mysql_statement_service_imp.h:92
static mysql_service_status_t fetch_field(my_h_statement statement, uint32_t column_index, my_h_field *field) noexcept
Definition: mysql_statement_service_imp.cc:571
static mysql_service_status_t field_count(my_h_statement statement, uint32_t *num_fields) noexcept
Definition: mysql_statement_service_imp.cc:583
static mysql_service_status_t field_info(my_h_field field, const char *name, void *data) noexcept
Definition: mysql_statement_service_imp.cc:596
Specifies macros to define Components.
This file contains the field type.
static int count
Definition: myisam_ftdump.cc:45
static char * query
Definition: myisam_ftdump.cc:47
struct my_h_warning_imp * my_h_warning
Definition: mysql_statement_service.h:38
struct my_h_row_imp * my_h_row
Definition: mysql_statement_service.h:36
struct my_h_statement_imp * my_h_statement
Definition: mysql_statement_service.h:35
struct my_h_field_imp * my_h_field
Definition: mysql_statement_service.h:37
String related data structures.
void warning(const char *format,...)
constexpr value_type is_unsigned
Definition: classic_protocol_constants.h:273
required string type
Definition: replication_group_member_actions.proto:34
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
case opt name
Definition: sslopt-case.h:29
Definition: mle_time_bits.h:37
String with length information.
Definition: mysql_string_defs.h:33
Definition: mysqlslap.cc:219