MySQL
9.3.0
Source Code Documentation
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
row.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017, 2025, Oracle and/or its affiliates.
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License, version 2.0,
6
* as published by the Free Software Foundation.
7
*
8
* This program is designed to work with certain software (including
9
* but not limited to OpenSSL) that is licensed under separate terms,
10
* as designated in a particular file or component or in included license
11
* documentation. The authors of MySQL hereby grant you an additional
12
* permission to link the program and your derivative works with the
13
* separately licensed software that they have either included with
14
* the program or referenced in the documentation.
15
*
16
* This program is distributed in the hope that it will be useful, but
17
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
19
* the GNU General Public License, version 2.0, for more details.
20
*
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software Foundation, Inc.,
23
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
*/
25
26
// MySQL DB access module, for use by plugins and others
27
// For the module that implements interactive DB functionality see mod_db
28
29
#ifndef ROUTER_SRC_JIT_EXECUTOR_SRC_DATABASE_ROW_H_
30
#define ROUTER_SRC_JIT_EXECUTOR_SRC_DATABASE_ROW_H_
31
32
#include <map>
33
#include <set>
34
#include <vector>
35
36
#include "
database/column.h
"
37
#include "
database/row.h
"
38
#include "
mysqlrouter/jit_executor_db_interface.h
"
39
40
#include <
mysql.h
>
41
#include <memory>
42
#include <stdexcept>
43
44
namespace
shcore
{
45
namespace
polyglot {
46
namespace
database {
47
48
class
bad_field
:
public
std::invalid_argument {
49
public
:
50
bad_field
(
const
char
*msg, uint32_t
index
)
51
:
std
::invalid_argument(msg),
field
(
index
) {}
52
uint32_t
field
;
53
};
54
55
class
DbResult
;
56
class
Row
:
public
jit_executor::db::IRow
{
57
public
:
58
Row
(
const
Row
&) =
delete
;
59
void
operator=
(
const
Row
&) =
delete
;
60
61
uint32_t
num_fields
()
const override
;
62
63
Type
get_type
(uint32_t
index
)
const override
;
64
bool
is_null
(uint32_t
index
)
const override
;
65
std::string
get_as_string
(uint32_t
index
)
const override
;
66
67
std::string
get_string
(uint32_t
index
)
const override
;
68
std::wstring
get_wstring
(uint32_t
index
)
const override
;
69
int64_t
get_int
(uint32_t
index
)
const override
;
70
uint64_t
get_uint
(uint32_t
index
)
const override
;
71
float
get_float
(uint32_t
index
)
const override
;
72
double
get_double
(uint32_t
index
)
const override
;
73
std::pair<const char *, size_t>
get_string_data
(
74
uint32_t
index
)
const override
;
75
void
get_raw_data
(uint32_t
index
,
const
char
**out_data,
76
size_t
*out_size)
const override
;
77
std::tuple<uint64_t, int>
get_bit
(uint32_t
index
)
const override
;
78
79
inline
void
reset
(
MYSQL_ROW
row,
const
unsigned
long
*
lengths
) {
80
_row
= row;
81
_lengths
=
lengths
;
82
}
83
84
private
:
85
friend
class
DbResult
;
86
explicit
Row
(
DbResult
*
result
);
87
Row
(
DbResult
*
result
,
MYSQL_ROW
row,
const
unsigned
long
*
lengths
);
88
89
DbResult
&
_result
;
90
MYSQL_ROW
_row
;
91
const
unsigned
long
*
_lengths
;
92
uint32_t
m_num_fields
;
93
};
94
95
}
// namespace database
96
}
// namespace polyglot
97
}
// namespace shcore
98
#endif
// ROUTER_SRC_JIT_EXECUTOR_SRC_DATABASE_ROW_H_
jit_executor::db::IRow
Definition:
jit_executor_db_interface.h:82
shcore::polyglot::database::DbResult
Definition:
result.h:61
shcore::polyglot::database::Row
Definition:
row.h:56
shcore::polyglot::database::Row::get_raw_data
void get_raw_data(uint32_t index, const char **out_data, size_t *out_size) const override
Definition:
row.cc:215
shcore::polyglot::database::Row::_lengths
const unsigned long * _lengths
Definition:
row.h:91
shcore::polyglot::database::Row::get_float
float get_float(uint32_t index) const override
Definition:
row.cc:222
shcore::polyglot::database::Row::Row
Row(const Row &)=delete
shcore::polyglot::database::Row::operator=
void operator=(const Row &)=delete
shcore::polyglot::database::Row::get_as_string
std::string get_as_string(uint32_t index) const override
Definition:
row.cc:139
shcore::polyglot::database::Row::get_string_data
std::pair< const char *, size_t > get_string_data(uint32_t index) const override
Definition:
row.cc:210
shcore::polyglot::database::Row::get_string
std::string get_string(uint32_t index) const override
Definition:
row.cc:198
shcore::polyglot::database::Row::get_double
double get_double(uint32_t index) const override
Definition:
row.cc:234
shcore::polyglot::database::Row::is_null
bool is_null(uint32_t index) const override
Definition:
row.cc:126
shcore::polyglot::database::Row::get_int
int64_t get_int(uint32_t index) const override
Definition:
row.cc:154
shcore::polyglot::database::Row::m_num_fields
uint32_t m_num_fields
Definition:
row.h:92
shcore::polyglot::database::Row::reset
void reset(MYSQL_ROW row, const unsigned long *lengths)
Definition:
row.h:79
shcore::polyglot::database::Row::get_type
Type get_type(uint32_t index) const override
Definition:
row.cc:134
shcore::polyglot::database::Row::_row
MYSQL_ROW _row
Definition:
row.h:90
shcore::polyglot::database::Row::num_fields
uint32_t num_fields() const override
Definition:
row.cc:132
shcore::polyglot::database::Row::get_uint
uint64_t get_uint(uint32_t index) const override
Definition:
row.cc:178
shcore::polyglot::database::Row::get_wstring
std::wstring get_wstring(uint32_t index) const override
Definition:
row.cc:204
shcore::polyglot::database::Row::get_bit
std::tuple< uint64_t, int > get_bit(uint32_t index) const override
Definition:
row.cc:246
shcore::polyglot::database::Row::_result
DbResult & _result
Definition:
row.h:89
shcore::polyglot::database::bad_field
Definition:
row.h:48
shcore::polyglot::database::bad_field::field
uint32_t field
Definition:
row.h:52
shcore::polyglot::database::bad_field::bad_field
bad_field(const char *msg, uint32_t index)
Definition:
row.h:50
Type
mrs::interface::RestHandler::HttpResult::Type Type
Definition:
handler_content_file.cc:42
jit_executor_db_interface.h
lengths
static uint lengths[256]
Definition:
myisam_ftdump.cc:48
mysql.h
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
MYSQL_ROW
char ** MYSQL_ROW
Definition:
mysql.h:145
helper::index
bool index(const std::string &value, const String &search_for, uint32_t *idx)
Definition:
contains.h:75
shcore
Definition:
file_system_exceptions.h:34
std
Definition:
gcs_xcom_synode.h:64
column.h
row.h
result
Definition:
result.h:30
router
src
jit_executor
src
database
row.h
Generated by
1.9.2